Inflate admin package.
This commit is contained in:
parent
0a1e0d249f
commit
f5d514470d
74
src/internal/connector/graph/betasdk/beta_client.go
Normal file
74
src/internal/connector/graph/betasdk/beta_client.go
Normal file
@ -0,0 +1,74 @@
|
||||
package betasdk
|
||||
|
||||
import (
|
||||
i25911dc319edd61cbac496af7eab5ef20b6069a42515e22ec6a9bc97bf598488 "github.com/microsoft/kiota-serialization-json-go"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i4bcdc892e61ac17e2afc10b5e2b536b29f4fd6c1ad30f4a5a68df47495db3347 "github.com/microsoft/kiota-serialization-form-go"
|
||||
i7294a22093d408fdca300f11b81a887d89c47b764af06c8b803e2323973fdb83 "github.com/microsoft/kiota-serialization-text-go"
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
i1a3c1a5501c5e41b7fd169f2d4c768dce9b096ac28fb5431bf02afcc57295411 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/sites"
|
||||
i2eb6d683e5428ebf135f99959034915f5e407cd2f29750b77adb5df72d90e064 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/groups"
|
||||
ibf5c397449f66e6fa06ac9bc6395bf62fb3c888bc28f9cd7cc6bd015dffe3817 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/admin"
|
||||
)
|
||||
|
||||
// BetaClient the main entry point of the SDK, exposes the configuration and the fluent API.
|
||||
type BetaClient 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
|
||||
}
|
||||
// Admin the admin property
|
||||
func (m *BetaClient) Admin()(*ibf5c397449f66e6fa06ac9bc6395bf62fb3c888bc28f9cd7cc6bd015dffe3817.AdminRequestBuilder) {
|
||||
return ibf5c397449f66e6fa06ac9bc6395bf62fb3c888bc28f9cd7cc6bd015dffe3817.NewAdminRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// NewBetaClient instantiates a new BetaClient and sets the default values.
|
||||
func NewBetaClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BetaClient) {
|
||||
m := &BetaClient{
|
||||
}
|
||||
m.pathParameters = make(map[string]string);
|
||||
m.urlTemplate = "{+baseurl}";
|
||||
m.requestAdapter = requestAdapter;
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultSerializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriterFactory { return i25911dc319edd61cbac496af7eab5ef20b6069a42515e22ec6a9bc97bf598488.NewJsonSerializationWriterFactory() })
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultSerializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriterFactory { return i7294a22093d408fdca300f11b81a887d89c47b764af06c8b803e2323973fdb83.NewTextSerializationWriterFactory() })
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultSerializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriterFactory { return i4bcdc892e61ac17e2afc10b5e2b536b29f4fd6c1ad30f4a5a68df47495db3347.NewFormSerializationWriterFactory() })
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i25911dc319edd61cbac496af7eab5ef20b6069a42515e22ec6a9bc97bf598488.NewJsonParseNodeFactory() })
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i7294a22093d408fdca300f11b81a887d89c47b764af06c8b803e2323973fdb83.NewTextParseNodeFactory() })
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RegisterDefaultDeserializer(func() i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNodeFactory { return i4bcdc892e61ac17e2afc10b5e2b536b29f4fd6c1ad30f4a5a68df47495db3347.NewFormParseNodeFactory() })
|
||||
if m.requestAdapter.GetBaseUrl() == "" {
|
||||
m.requestAdapter.SetBaseUrl("https://graph.microsoft.com/beta")
|
||||
}
|
||||
return m
|
||||
}
|
||||
// Groups the groups property
|
||||
func (m *BetaClient) Groups()(*i2eb6d683e5428ebf135f99959034915f5e407cd2f29750b77adb5df72d90e064.GroupsRequestBuilder) {
|
||||
return i2eb6d683e5428ebf135f99959034915f5e407cd2f29750b77adb5df72d90e064.NewGroupsRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// GroupsById gets an item from the github.com/alcionai/corso/src/internal/connector/graph/betasdk.groups.item collection
|
||||
func (m *BetaClient) GroupsById(id string)(*i2eb6d683e5428ebf135f99959034915f5e407cd2f29750b77adb5df72d90e064.GroupItemRequestBuilder) {
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range m.pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if id != "" {
|
||||
urlTplParams["group%2Did"] = id
|
||||
}
|
||||
return i2eb6d683e5428ebf135f99959034915f5e407cd2f29750b77adb5df72d90e064.NewGroupItemRequestBuilderInternal(urlTplParams, m.requestAdapter);
|
||||
}
|
||||
// Sites the sites property
|
||||
func (m *BetaClient) Sites()(*i1a3c1a5501c5e41b7fd169f2d4c768dce9b096ac28fb5431bf02afcc57295411.SitesRequestBuilder) {
|
||||
return i1a3c1a5501c5e41b7fd169f2d4c768dce9b096ac28fb5431bf02afcc57295411.NewSitesRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
)
|
||||
|
||||
// GroupItemRequestBuilder builds and executes requests for operations under \groups\{group-id}
|
||||
type GroupItemRequestBuilder 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
|
||||
}
|
||||
// NewGroupItemRequestBuilderInternal instantiates a new GroupItemRequestBuilder and sets the default values.
|
||||
func NewGroupItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GroupItemRequestBuilder) {
|
||||
m := &GroupItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewGroupItemRequestBuilder instantiates a new GroupItemRequestBuilder and sets the default values.
|
||||
func NewGroupItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GroupItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewGroupItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Sites the sites property
|
||||
func (m *GroupItemRequestBuilder) Sites()(*ItemSitesRequestBuilder) {
|
||||
return NewItemSitesRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// SitesById provides operations to manage the sites property of the microsoft.graph.group entity.
|
||||
func (m *GroupItemRequestBuilder) SitesById(id string)(*ItemSitesSiteItemRequestBuilder) {
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range m.pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if id != "" {
|
||||
urlTplParams["site%2Did"] = id
|
||||
}
|
||||
return NewItemSitesSiteItemRequestBuilderInternal(urlTplParams, m.requestAdapter);
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
)
|
||||
|
||||
// GroupsRequestBuilder builds and executes requests for operations under \groups
|
||||
type GroupsRequestBuilder 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
|
||||
}
|
||||
// NewGroupsRequestBuilderInternal instantiates a new GroupsRequestBuilder and sets the default values.
|
||||
func NewGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GroupsRequestBuilder) {
|
||||
m := &GroupsRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewGroupsRequestBuilder instantiates a new GroupsRequestBuilder and sets the default values.
|
||||
func NewGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GroupsRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewGroupsRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesAddPostRequestBody provides operations to call the add method.
|
||||
type ItemSitesAddPostRequestBody 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 value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable
|
||||
}
|
||||
// NewItemSitesAddPostRequestBody instantiates a new ItemSitesAddPostRequestBody and sets the default values.
|
||||
func NewItemSitesAddPostRequestBody()(*ItemSitesAddPostRequestBody) {
|
||||
m := &ItemSitesAddPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesAddPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesAddPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesAddPostRequestBody(), 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 *ItemSitesAddPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesAddPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateSiteFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesAddPostRequestBody) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesAddPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
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
|
||||
}
|
||||
}
|
||||
{
|
||||
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 *ItemSitesAddPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetValue sets the value property value. The value property
|
||||
func (m *ItemSitesAddPostRequestBody) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesAddPostRequestBodyable
|
||||
type ItemSitesAddPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)()
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesAddRequestBuilder provides operations to call the add method.
|
||||
type ItemSitesAddRequestBuilder 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
|
||||
}
|
||||
// ItemSitesAddRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesAddRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesAddRequestBuilderInternal instantiates a new AddRequestBuilder and sets the default values.
|
||||
func NewItemSitesAddRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesAddRequestBuilder) {
|
||||
m := &ItemSitesAddRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/microsoft.graph.add";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesAddRequestBuilder instantiates a new AddRequestBuilder and sets the default values.
|
||||
func NewItemSitesAddRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesAddRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesAddRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation follow a user's site or multiple sites.
|
||||
func (m *ItemSitesAddRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesAddPostRequestBodyable, requestConfiguration *ItemSitesAddRequestBuilderPostRequestConfiguration)(*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 follow a user's site or multiple sites.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/site-follow?view=graph-rest-1.0
|
||||
func (m *ItemSitesAddRequestBuilder) Post(ctx context.Context, body ItemSitesAddPostRequestBodyable, requestConfiguration *ItemSitesAddRequestBuilderPostRequestConfiguration)(ItemSitesAddResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesAddResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesAddResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesAddResponse provides operations to call the add method.
|
||||
type ItemSitesAddResponse struct {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse
|
||||
// The value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable
|
||||
}
|
||||
// NewItemSitesAddResponse instantiates a new ItemSitesAddResponse and sets the default values.
|
||||
func NewItemSitesAddResponse()(*ItemSitesAddResponse) {
|
||||
m := &ItemSitesAddResponse{
|
||||
BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(),
|
||||
}
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesAddResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesAddResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesAddResponse(), nil
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesAddResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateSiteFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesAddResponse) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesAddResponse) 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 *ItemSitesAddResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesAddResponseable
|
||||
type ItemSitesAddResponseable interface {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)()
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesCountRequestBuilder) {
|
||||
m := &ItemSitesCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/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
|
||||
}
|
||||
// NewItemSitesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesDeltaRequestBuilder provides operations to call the delta method.
|
||||
type ItemSitesDeltaRequestBuilder 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
|
||||
}
|
||||
// ItemSitesDeltaRequestBuilderGetQueryParameters invoke function delta
|
||||
type ItemSitesDeltaRequestBuilderGetQueryParameters struct {
|
||||
// Include count of items
|
||||
Count *bool `uriparametername:"%24count"`
|
||||
// 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"`
|
||||
}
|
||||
// ItemSitesDeltaRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesDeltaRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesDeltaRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesDeltaRequestBuilderInternal instantiates a new DeltaRequestBuilder and sets the default values.
|
||||
func NewItemSitesDeltaRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesDeltaRequestBuilder) {
|
||||
m := &ItemSitesDeltaRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/microsoft.graph.delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesDeltaRequestBuilder instantiates a new DeltaRequestBuilder and sets the default values.
|
||||
func NewItemSitesDeltaRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesDeltaRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesDeltaRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation invoke function delta
|
||||
func (m *ItemSitesDeltaRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesDeltaRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get invoke function delta
|
||||
func (m *ItemSitesDeltaRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesDeltaRequestBuilderGetRequestConfiguration)(ItemSitesDeltaResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesDeltaResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesDeltaResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesDeltaResponse provides operations to call the delta method.
|
||||
type ItemSitesDeltaResponse struct {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseDeltaFunctionResponse
|
||||
// The value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable
|
||||
}
|
||||
// NewItemSitesDeltaResponse instantiates a new ItemSitesDeltaResponse and sets the default values.
|
||||
func NewItemSitesDeltaResponse()(*ItemSitesDeltaResponse) {
|
||||
m := &ItemSitesDeltaResponse{
|
||||
BaseDeltaFunctionResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseDeltaFunctionResponse(),
|
||||
}
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesDeltaResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesDeltaResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesDeltaResponse(), nil
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesDeltaResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := m.BaseDeltaFunctionResponse.GetFieldDeserializers()
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateSiteFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesDeltaResponse) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesDeltaResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
err := m.BaseDeltaFunctionResponse.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 *ItemSitesDeltaResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesDeltaResponseable
|
||||
type ItemSitesDeltaResponseable interface {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseDeltaFunctionResponseable
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)()
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemAnalyticsRequestBuilder provides operations to manage the analytics property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemAnalyticsRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemAnalyticsRequestBuilderGetQueryParameters analytics about the view activities that took place in this site.
|
||||
type ItemSitesItemAnalyticsRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemAnalyticsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemAnalyticsRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemAnalyticsRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemAnalyticsRequestBuilderInternal instantiates a new AnalyticsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemAnalyticsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemAnalyticsRequestBuilder) {
|
||||
m := &ItemSitesItemAnalyticsRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/analytics{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemAnalyticsRequestBuilder instantiates a new AnalyticsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemAnalyticsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemAnalyticsRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemAnalyticsRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation analytics about the view activities that took place in this site.
|
||||
func (m *ItemSitesItemAnalyticsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemAnalyticsRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get analytics about the view activities that took place in this site.
|
||||
func (m *ItemSitesItemAnalyticsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemAnalyticsRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemAnalyticsable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateItemAnalyticsFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemAnalyticsable), nil
|
||||
}
|
||||
@ -0,0 +1,167 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemColumnsColumnDefinitionItemRequestBuilder provides operations to manage the columns property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemColumnsColumnDefinitionItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemColumnsColumnDefinitionItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemColumnsColumnDefinitionItemRequestBuilderDeleteRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// ItemSitesItemColumnsColumnDefinitionItemRequestBuilderGetQueryParameters the collection of column definitions reusable across lists under this site.
|
||||
type ItemSitesItemColumnsColumnDefinitionItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemColumnsColumnDefinitionItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemColumnsColumnDefinitionItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemColumnsColumnDefinitionItemRequestBuilderPatchRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemColumnsColumnDefinitionItemRequestBuilderInternal instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemColumnsColumnDefinitionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) {
|
||||
m := &ItemSitesItemColumnsColumnDefinitionItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/columns/{columnDefinition%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemColumnsColumnDefinitionItemRequestBuilder instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemColumnsColumnDefinitionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemColumnsColumnDefinitionItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateDeleteRequestInformation delete navigation property columns for groups
|
||||
func (m *ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemColumnsColumnDefinitionItemRequestBuilderDeleteRequestConfiguration)(*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 column definitions reusable across lists under this site.
|
||||
func (m *ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration)(*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 groups
|
||||
func (m *ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, requestConfiguration *ItemSitesItemColumnsColumnDefinitionItemRequestBuilderPatchRequestConfiguration)(*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 groups
|
||||
func (m *ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemSitesItemColumnsColumnDefinitionItemRequestBuilderDeleteRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// Get the collection of column definitions reusable across lists under this site.
|
||||
func (m *ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
// Patch update the navigation property columns in groups
|
||||
func (m *ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, requestConfiguration *ItemSitesItemColumnsColumnDefinitionItemRequestBuilderPatchRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
// SourceColumn provides operations to manage the sourceColumn property of the microsoft.graph.columnDefinition entity.
|
||||
func (m *ItemSitesItemColumnsColumnDefinitionItemRequestBuilder) SourceColumn()(*ItemSitesItemColumnsItemSourceColumnRequestBuilder) {
|
||||
return NewItemSitesItemColumnsItemSourceColumnRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemColumnsCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemColumnsCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemColumnsCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemColumnsCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemColumnsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemColumnsCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemColumnsCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemColumnsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemColumnsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemColumnsCountRequestBuilder) {
|
||||
m := &ItemSitesItemColumnsCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%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
|
||||
}
|
||||
// NewItemSitesItemColumnsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemColumnsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemColumnsCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemColumnsCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemColumnsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemColumnsCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemColumnsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemColumnsCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemColumnsItemSourceColumnRequestBuilder provides operations to manage the sourceColumn property of the microsoft.graph.columnDefinition entity.
|
||||
type ItemSitesItemColumnsItemSourceColumnRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemColumnsItemSourceColumnRequestBuilderGetQueryParameters the source column for content type column.
|
||||
type ItemSitesItemColumnsItemSourceColumnRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemColumnsItemSourceColumnRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemColumnsItemSourceColumnRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemColumnsItemSourceColumnRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemColumnsItemSourceColumnRequestBuilderInternal instantiates a new SourceColumnRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemColumnsItemSourceColumnRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemColumnsItemSourceColumnRequestBuilder) {
|
||||
m := &ItemSitesItemColumnsItemSourceColumnRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/columns/{columnDefinition%2Did}/sourceColumn{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemColumnsItemSourceColumnRequestBuilder instantiates a new SourceColumnRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemColumnsItemSourceColumnRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemColumnsItemSourceColumnRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemColumnsItemSourceColumnRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation the source column for content type column.
|
||||
func (m *ItemSitesItemColumnsItemSourceColumnRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemColumnsItemSourceColumnRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get the source column for content type column.
|
||||
func (m *ItemSitesItemColumnsItemSourceColumnRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemColumnsItemSourceColumnRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemColumnsRequestBuilder provides operations to manage the columns property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemColumnsRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemColumnsRequestBuilderGetQueryParameters get the collection of columns, represented as [columnDefinition][columnDefinition] resources, in a [site][site].
|
||||
type ItemSitesItemColumnsRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemColumnsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemColumnsRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemColumnsRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemColumnsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemColumnsRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemColumnsRequestBuilderInternal instantiates a new ColumnsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemColumnsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemColumnsRequestBuilder) {
|
||||
m := &ItemSitesItemColumnsRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%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
|
||||
}
|
||||
// NewItemSitesItemColumnsRequestBuilder instantiates a new ColumnsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemColumnsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemColumnsRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemColumnsRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemColumnsRequestBuilder) Count()(*ItemSitesItemColumnsCountRequestBuilder) {
|
||||
return NewItemSitesItemColumnsCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation get the collection of columns, represented as [columnDefinition][columnDefinition] resources, in a [site][site].
|
||||
func (m *ItemSitesItemColumnsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemColumnsRequestBuilderGetRequestConfiguration)(*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 a column for a [site][site] by specifying a [columnDefinition][columnDefinition].
|
||||
func (m *ItemSitesItemColumnsRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, requestConfiguration *ItemSitesItemColumnsRequestBuilderPostRequestConfiguration)(*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 collection of columns, represented as [columnDefinition][columnDefinition] resources, in a [site][site].
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/site-list-columns?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemColumnsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemColumnsRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionCollectionResponseable), nil
|
||||
}
|
||||
// Post create a column for a [site][site] by specifying a [columnDefinition][columnDefinition].
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/site-post-columns?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemColumnsRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, requestConfiguration *ItemSitesItemColumnsRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody provides operations to call the addCopyFromContentTypeHub method.
|
||||
type ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody 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 contentTypeId property
|
||||
contentTypeId *string
|
||||
}
|
||||
// NewItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody instantiates a new ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody()(*ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody) {
|
||||
m := &ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody(), 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 *ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetContentTypeId gets the contentTypeId property value. The contentTypeId property
|
||||
func (m *ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody) GetContentTypeId()(*string) {
|
||||
return m.contentTypeId
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["contentTypeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetStringValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetContentTypeId(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteStringValue("contentTypeId", m.GetContentTypeId())
|
||||
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 *ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetContentTypeId sets the contentTypeId property value. The contentTypeId property
|
||||
func (m *ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBody) SetContentTypeId(value *string)() {
|
||||
m.contentTypeId = value
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBodyable
|
||||
type ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetContentTypeId()(*string)
|
||||
SetContentTypeId(value *string)()
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder provides operations to call the addCopyFromContentTypeHub method.
|
||||
type ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilderInternal instantiates a new AddCopyFromContentTypeHubRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/microsoft.graph.addCopyFromContentTypeHub";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder instantiates a new AddCopyFromContentTypeHubRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021.
|
||||
func (m *ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBodyable, requestConfiguration *ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration)(*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 add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/contenttype-addcopyfromcontenttypehub?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder) Post(ctx context.Context, body ItemSitesItemContentTypesAddCopyFromContentTypeHubPostRequestBodyable, requestConfiguration *ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable), nil
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesAddCopyPostRequestBody provides operations to call the addCopy method.
|
||||
type ItemSitesItemContentTypesAddCopyPostRequestBody 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 contentType property
|
||||
contentType *string
|
||||
}
|
||||
// NewItemSitesItemContentTypesAddCopyPostRequestBody instantiates a new ItemSitesItemContentTypesAddCopyPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemContentTypesAddCopyPostRequestBody()(*ItemSitesItemContentTypesAddCopyPostRequestBody) {
|
||||
m := &ItemSitesItemContentTypesAddCopyPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemContentTypesAddCopyPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemContentTypesAddCopyPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemContentTypesAddCopyPostRequestBody(), 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 *ItemSitesItemContentTypesAddCopyPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetContentType gets the contentType property value. The contentType property
|
||||
func (m *ItemSitesItemContentTypesAddCopyPostRequestBody) GetContentType()(*string) {
|
||||
return m.contentType
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemContentTypesAddCopyPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetStringValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetContentType(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemContentTypesAddCopyPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteStringValue("contentType", m.GetContentType())
|
||||
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 *ItemSitesItemContentTypesAddCopyPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetContentType sets the contentType property value. The contentType property
|
||||
func (m *ItemSitesItemContentTypesAddCopyPostRequestBody) SetContentType(value *string)() {
|
||||
m.contentType = value
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesAddCopyPostRequestBodyable
|
||||
type ItemSitesItemContentTypesAddCopyPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetContentType()(*string)
|
||||
SetContentType(value *string)()
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesAddCopyRequestBuilder provides operations to call the addCopy method.
|
||||
type ItemSitesItemContentTypesAddCopyRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesAddCopyRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesAddCopyRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesAddCopyRequestBuilderInternal instantiates a new AddCopyRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesAddCopyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesAddCopyRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesAddCopyRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/microsoft.graph.addCopy";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesAddCopyRequestBuilder instantiates a new AddCopyRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesAddCopyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesAddCopyRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesAddCopyRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation add a copy of a [content type][contentType] from a [site][site] to a [list][list].
|
||||
func (m *ItemSitesItemContentTypesAddCopyRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemContentTypesAddCopyPostRequestBodyable, requestConfiguration *ItemSitesItemContentTypesAddCopyRequestBuilderPostRequestConfiguration)(*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 add a copy of a [content type][contentType] from a [site][site] to a [list][list].
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/contenttype-addcopy?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesAddCopyRequestBuilder) Post(ctx context.Context, body ItemSitesItemContentTypesAddCopyPostRequestBodyable, requestConfiguration *ItemSitesItemContentTypesAddCopyRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable), nil
|
||||
}
|
||||
@ -0,0 +1,247 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesContentTypeItemRequestBuilder provides operations to manage the contentTypes property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemContentTypesContentTypeItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesContentTypeItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesContentTypeItemRequestBuilderDeleteRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// ItemSitesItemContentTypesContentTypeItemRequestBuilderGetQueryParameters the collection of content types defined for this site.
|
||||
type ItemSitesItemContentTypesContentTypeItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemContentTypesContentTypeItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesContentTypeItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesContentTypeItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemContentTypesContentTypeItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesContentTypeItemRequestBuilderPatchRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// AssociateWithHubSites provides operations to call the associateWithHubSites method.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) AssociateWithHubSites()(*ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// Base provides operations to manage the base property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) Base()(*ItemSitesItemContentTypesItemBaseRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemBaseRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// BaseTypes provides operations to manage the baseTypes property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) BaseTypes()(*ItemSitesItemContentTypesItemBaseTypesRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemBaseTypesRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// BaseTypesById provides operations to manage the baseTypes property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) BaseTypesById(id string)(*ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder) {
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range m.pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if id != "" {
|
||||
urlTplParams["contentType%2Did1"] = id
|
||||
}
|
||||
return NewItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderInternal(urlTplParams, m.requestAdapter);
|
||||
}
|
||||
// ColumnLinks provides operations to manage the columnLinks property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) ColumnLinks()(*ItemSitesItemContentTypesItemColumnLinksRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemColumnLinksRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// ColumnLinksById provides operations to manage the columnLinks property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) ColumnLinksById(id string)(*ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) {
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range m.pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if id != "" {
|
||||
urlTplParams["columnLink%2Did"] = id
|
||||
}
|
||||
return NewItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderInternal(urlTplParams, m.requestAdapter);
|
||||
}
|
||||
// ColumnPositions provides operations to manage the columnPositions property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) ColumnPositions()(*ItemSitesItemContentTypesItemColumnPositionsRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemColumnPositionsRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// ColumnPositionsById provides operations to manage the columnPositions property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) ColumnPositionsById(id string)(*ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder) {
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range m.pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if id != "" {
|
||||
urlTplParams["columnDefinition%2Did"] = id
|
||||
}
|
||||
return NewItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderInternal(urlTplParams, m.requestAdapter);
|
||||
}
|
||||
// Columns provides operations to manage the columns property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) Columns()(*ItemSitesItemContentTypesItemColumnsRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemColumnsRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// ColumnsById provides operations to manage the columns property of the microsoft.graph.contentType entity.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) ColumnsById(id string)(*ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) {
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range m.pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if id != "" {
|
||||
urlTplParams["columnDefinition%2Did"] = id
|
||||
}
|
||||
return NewItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderInternal(urlTplParams, m.requestAdapter);
|
||||
}
|
||||
// NewItemSitesItemContentTypesContentTypeItemRequestBuilderInternal instantiates a new ContentTypeItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesContentTypeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesContentTypeItemRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesContentTypeItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesContentTypeItemRequestBuilder instantiates a new ContentTypeItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesContentTypeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesContentTypeItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesContentTypeItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CopyToDefaultContentLocation provides operations to call the copyToDefaultContentLocation method.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) CopyToDefaultContentLocation()(*ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateDeleteRequestInformation delete navigation property contentTypes for groups
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesContentTypeItemRequestBuilderDeleteRequestConfiguration)(*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 content types defined for this site.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesContentTypeItemRequestBuilderGetRequestConfiguration)(*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 contentTypes in groups
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, requestConfiguration *ItemSitesItemContentTypesContentTypeItemRequestBuilderPatchRequestConfiguration)(*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 contentTypes for groups
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesContentTypeItemRequestBuilderDeleteRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// Get the collection of content types defined for this site.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesContentTypeItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable), nil
|
||||
}
|
||||
// IsPublished provides operations to call the isPublished method.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) IsPublished()(*ItemSitesItemContentTypesItemIsPublishedRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemIsPublishedRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// Patch update the navigation property contentTypes in groups
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, requestConfiguration *ItemSitesItemContentTypesContentTypeItemRequestBuilderPatchRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable), nil
|
||||
}
|
||||
// Publish provides operations to call the publish method.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) Publish()(*ItemSitesItemContentTypesItemPublishRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemPublishRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// Unpublish provides operations to call the unpublish method.
|
||||
func (m *ItemSitesItemContentTypesContentTypeItemRequestBuilder) Unpublish()(*ItemSitesItemContentTypesItemUnpublishRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemUnpublishRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemContentTypesCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemContentTypesCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemContentTypesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesCountRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemContentTypesCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemContentTypesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder provides operations to call the getCompatibleHubContentTypes method.
|
||||
type ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderGetQueryParameters invoke function getCompatibleHubContentTypes
|
||||
type ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderGetQueryParameters struct {
|
||||
// Include count of items
|
||||
Count *bool `uriparametername:"%24count"`
|
||||
// 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"`
|
||||
}
|
||||
// ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderInternal instantiates a new GetCompatibleHubContentTypesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/microsoft.graph.getCompatibleHubContentTypes(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder instantiates a new GetCompatibleHubContentTypesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation invoke function getCompatibleHubContentTypes
|
||||
func (m *ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get invoke function getCompatibleHubContentTypes
|
||||
func (m *ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration)(ItemSitesItemContentTypesGetCompatibleHubContentTypesResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesItemContentTypesGetCompatibleHubContentTypesResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesItemContentTypesGetCompatibleHubContentTypesResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse provides operations to call the getCompatibleHubContentTypes method.
|
||||
type ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse struct {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse
|
||||
// The value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable
|
||||
}
|
||||
// NewItemSitesItemContentTypesGetCompatibleHubContentTypesResponse instantiates a new ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse and sets the default values.
|
||||
func NewItemSitesItemContentTypesGetCompatibleHubContentTypesResponse()(*ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse) {
|
||||
m := &ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse{
|
||||
BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(),
|
||||
}
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemContentTypesGetCompatibleHubContentTypesResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemContentTypesGetCompatibleHubContentTypesResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemContentTypesGetCompatibleHubContentTypesResponse(), nil
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse) 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 *ItemSitesItemContentTypesGetCompatibleHubContentTypesResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesGetCompatibleHubContentTypesResponseable
|
||||
type ItemSitesItemContentTypesGetCompatibleHubContentTypesResponseable interface {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable)()
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody provides operations to call the associateWithHubSites method.
|
||||
type ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody 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 hubSiteUrls property
|
||||
hubSiteUrls []string
|
||||
// The propagateToExistingLists property
|
||||
propagateToExistingLists *bool
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody instantiates a new ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody()(*ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) {
|
||||
m := &ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody(), 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 *ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["hubSiteUrls"] = 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.SetHubSiteUrls(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["propagateToExistingLists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetBoolValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetPropagateToExistingLists(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetHubSiteUrls gets the hubSiteUrls property value. The hubSiteUrls property
|
||||
func (m *ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) GetHubSiteUrls()([]string) {
|
||||
return m.hubSiteUrls
|
||||
}
|
||||
// GetPropagateToExistingLists gets the propagateToExistingLists property value. The propagateToExistingLists property
|
||||
func (m *ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) GetPropagateToExistingLists()(*bool) {
|
||||
return m.propagateToExistingLists
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
if m.GetHubSiteUrls() != nil {
|
||||
err := writer.WriteCollectionOfStringValues("hubSiteUrls", m.GetHubSiteUrls())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteBoolValue("propagateToExistingLists", m.GetPropagateToExistingLists())
|
||||
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 *ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetHubSiteUrls sets the hubSiteUrls property value. The hubSiteUrls property
|
||||
func (m *ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) SetHubSiteUrls(value []string)() {
|
||||
m.hubSiteUrls = value
|
||||
}
|
||||
// SetPropagateToExistingLists sets the propagateToExistingLists property value. The propagateToExistingLists property
|
||||
func (m *ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBody) SetPropagateToExistingLists(value *bool)() {
|
||||
m.propagateToExistingLists = value
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBodyable
|
||||
type ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetHubSiteUrls()([]string)
|
||||
GetPropagateToExistingLists()(*bool)
|
||||
SetHubSiteUrls(value []string)()
|
||||
SetPropagateToExistingLists(value *bool)()
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder provides operations to call the associateWithHubSites method.
|
||||
type ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilderInternal instantiates a new AssociateWithHubSitesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/microsoft.graph.associateWithHubSites";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder instantiates a new AssociateWithHubSitesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation associate a [content type][contentType] with a list of hub sites.
|
||||
func (m *ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBodyable, requestConfiguration *ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
|
||||
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
|
||||
requestInfo.UrlTemplate = m.urlTemplate
|
||||
requestInfo.PathParameters = m.pathParameters
|
||||
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
|
||||
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
|
||||
if requestConfiguration != nil {
|
||||
requestInfo.Headers.AddAll(requestConfiguration.Headers)
|
||||
requestInfo.AddRequestOptions(requestConfiguration.Options)
|
||||
}
|
||||
return requestInfo, nil
|
||||
}
|
||||
// Post associate a [content type][contentType] with a list of hub sites.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/contenttype-associatewithhubsites?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilder) Post(ctx context.Context, body ItemSitesItemContentTypesItemAssociateWithHubSitesPostRequestBodyable, requestConfiguration *ItemSitesItemContentTypesItemAssociateWithHubSitesRequestBuilderPostRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreatePostRequestInformation(ctx, body, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemBaseRequestBuilder provides operations to manage the base property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemBaseRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemBaseRequestBuilderGetQueryParameters parent contentType from which this content type is derived.
|
||||
type ItemSitesItemContentTypesItemBaseRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemBaseRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemBaseRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemBaseRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemBaseRequestBuilderInternal instantiates a new BaseRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemBaseRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemBaseRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemBaseRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/base{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemBaseRequestBuilder instantiates a new BaseRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemBaseRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemBaseRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemBaseRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation parent contentType from which this content type is derived.
|
||||
func (m *ItemSitesItemContentTypesItemBaseRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemBaseRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get parent contentType from which this content type is derived.
|
||||
func (m *ItemSitesItemContentTypesItemBaseRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemBaseRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable), nil
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder provides operations to manage the baseTypes property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderGetQueryParameters the collection of content types that are ancestors of this content type.
|
||||
type ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderInternal instantiates a new ContentTypeItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/baseTypes/{contentType%2Did1}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder instantiates a new ContentTypeItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation the collection of content types that are ancestors of this content type.
|
||||
func (m *ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get the collection of content types that are ancestors of this content type.
|
||||
func (m *ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemBaseTypesContentTypeItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable), nil
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemBaseTypesCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemContentTypesItemBaseTypesCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemBaseTypesCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemContentTypesItemBaseTypesCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemBaseTypesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemBaseTypesCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemBaseTypesCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemBaseTypesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemBaseTypesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemBaseTypesCountRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemBaseTypesCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/baseTypes/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemBaseTypesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemBaseTypesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemBaseTypesCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemBaseTypesCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemContentTypesItemBaseTypesCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemBaseTypesCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemContentTypesItemBaseTypesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemBaseTypesCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemBaseTypesRequestBuilder provides operations to manage the baseTypes property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemBaseTypesRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemBaseTypesRequestBuilderGetQueryParameters the collection of content types that are ancestors of this content type.
|
||||
type ItemSitesItemContentTypesItemBaseTypesRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemBaseTypesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemBaseTypesRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemBaseTypesRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemBaseTypesRequestBuilderInternal instantiates a new BaseTypesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemBaseTypesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemBaseTypesRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemBaseTypesRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/baseTypes{?%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
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemBaseTypesRequestBuilder instantiates a new BaseTypesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemBaseTypesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemBaseTypesRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemBaseTypesRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemContentTypesItemBaseTypesRequestBuilder) Count()(*ItemSitesItemContentTypesItemBaseTypesCountRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemBaseTypesCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation the collection of content types that are ancestors of this content type.
|
||||
func (m *ItemSitesItemContentTypesItemBaseTypesRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemBaseTypesRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get the collection of content types that are ancestors of this content type.
|
||||
func (m *ItemSitesItemContentTypesItemBaseTypesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemBaseTypesRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeCollectionResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,163 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder provides operations to manage the columnLinks property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderDeleteRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderGetQueryParameters the collection of columns that are required by this content type
|
||||
type ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderPatchRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderInternal instantiates a new ColumnLinkItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/columnLinks/{columnLink%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder instantiates a new ColumnLinkItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateDeleteRequestInformation delete navigation property columnLinks for groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderDeleteRequestConfiguration)(*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 columns that are required by this content type
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderGetRequestConfiguration)(*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 columnLinks in groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderPatchRequestConfiguration)(*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 columnLinks for groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderDeleteRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// Get the collection of columns that are required by this content type
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnLinkFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable), nil
|
||||
}
|
||||
// Patch update the navigation property columnLinks in groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksColumnLinkItemRequestBuilderPatchRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnLinkFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable), nil
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnLinksCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemContentTypesItemColumnLinksCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemContentTypesItemColumnLinksCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnLinksCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnLinksCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnLinksCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnLinksCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnLinksCountRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnLinksCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/columnLinks/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnLinksCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnLinksCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnLinksCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnLinksCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemContentTypesItemColumnLinksCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,144 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnLinksRequestBuilder provides operations to manage the columnLinks property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemColumnLinksRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksRequestBuilderGetQueryParameters the collection of columns that are required by this content type
|
||||
type ItemSitesItemContentTypesItemColumnLinksRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnLinksRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnLinksRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnLinksRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnLinksRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnLinksRequestBuilderInternal instantiates a new ColumnLinksRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnLinksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnLinksRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnLinksRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/columnLinks{?%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
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnLinksRequestBuilder instantiates a new ColumnLinksRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnLinksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnLinksRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnLinksRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksRequestBuilder) Count()(*ItemSitesItemContentTypesItemColumnLinksCountRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemColumnLinksCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation the collection of columns that are required by this content type
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksRequestBuilderGetRequestConfiguration)(*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 columnLinks for groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksRequestBuilderPostRequestConfiguration)(*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 collection of columns that are required by this content type
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnLinkCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkCollectionResponseable), nil
|
||||
}
|
||||
// Post create new navigation property to columnLinks for groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnLinksRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable, requestConfiguration *ItemSitesItemContentTypesItemColumnLinksRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnLinkFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnLinkable), nil
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder provides operations to manage the columnPositions property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderGetQueryParameters column order information in a content type.
|
||||
type ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderInternal instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/columnPositions/{columnDefinition%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation column order information in a content type.
|
||||
func (m *ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get column order information in a content type.
|
||||
func (m *ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnPositionsColumnDefinitionItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/columnPositions/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnPositionsRequestBuilder provides operations to manage the columnPositions property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemColumnPositionsRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnPositionsRequestBuilderGetQueryParameters column order information in a content type.
|
||||
type ItemSitesItemContentTypesItemColumnPositionsRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnPositionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnPositionsRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnPositionsRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnPositionsRequestBuilderInternal instantiates a new ColumnPositionsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnPositionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnPositionsRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnPositionsRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/columnPositions{?%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
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnPositionsRequestBuilder instantiates a new ColumnPositionsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnPositionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnPositionsRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnPositionsRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemContentTypesItemColumnPositionsRequestBuilder) Count()(*ItemSitesItemContentTypesItemColumnPositionsCountRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemColumnPositionsCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation column order information in a content type.
|
||||
func (m *ItemSitesItemContentTypesItemColumnPositionsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnPositionsRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get column order information in a content type.
|
||||
func (m *ItemSitesItemContentTypesItemColumnPositionsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnPositionsRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionCollectionResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,167 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder provides operations to manage the columns property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderDeleteRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderGetQueryParameters the collection of column definitions for this contentType.
|
||||
type ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderPatchRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderInternal instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/columns/{columnDefinition%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateDeleteRequestInformation delete navigation property columns for groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderDeleteRequestConfiguration)(*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 column definitions for this contentType.
|
||||
func (m *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration)(*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 groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, requestConfiguration *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderPatchRequestConfiguration)(*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 groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderDeleteRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// Get the collection of column definitions for this contentType.
|
||||
func (m *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
// Patch update the navigation property columns in groups
|
||||
func (m *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, requestConfiguration *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilderPatchRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
// SourceColumn provides operations to manage the sourceColumn property of the microsoft.graph.columnDefinition entity.
|
||||
func (m *ItemSitesItemContentTypesItemColumnsColumnDefinitionItemRequestBuilder) SourceColumn()(*ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnsCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemContentTypesItemColumnsCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemContentTypesItemColumnsCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnsCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnsCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnsCountRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnsCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%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
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnsCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnsCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemContentTypesItemColumnsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemContentTypesItemColumnsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder provides operations to manage the sourceColumn property of the microsoft.graph.columnDefinition entity.
|
||||
type ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderGetQueryParameters the source column for content type column.
|
||||
type ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderInternal instantiates a new SourceColumnRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/columns/{columnDefinition%2Did}/sourceColumn{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder instantiates a new SourceColumnRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation the source column for content type column.
|
||||
func (m *ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get the source column for content type column.
|
||||
func (m *ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsItemSourceColumnRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemColumnsRequestBuilder provides operations to manage the columns property of the microsoft.graph.contentType entity.
|
||||
type ItemSitesItemContentTypesItemColumnsRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsRequestBuilderGetQueryParameters get the collection of columns, represented as [columnDefinition][columnDefinition] resources, in a [content type][contentType].
|
||||
type ItemSitesItemContentTypesItemColumnsRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnsRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesItemColumnsRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemContentTypesItemColumnsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemColumnsRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnsRequestBuilderInternal instantiates a new ColumnsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnsRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemColumnsRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%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
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemColumnsRequestBuilder instantiates a new ColumnsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemColumnsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemColumnsRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemColumnsRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemContentTypesItemColumnsRequestBuilder) Count()(*ItemSitesItemContentTypesItemColumnsCountRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesItemColumnsCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation get the collection of columns, represented as [columnDefinition][columnDefinition] resources, in a [content type][contentType].
|
||||
func (m *ItemSitesItemContentTypesItemColumnsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsRequestBuilderGetRequestConfiguration)(*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 add a column to a [content type][contentType] in a site or list by specifying a [columnDefinition][columnDefinition].
|
||||
func (m *ItemSitesItemContentTypesItemColumnsRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, requestConfiguration *ItemSitesItemContentTypesItemColumnsRequestBuilderPostRequestConfiguration)(*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 collection of columns, represented as [columnDefinition][columnDefinition] resources, in a [content type][contentType].
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/contenttype-list-columns?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesItemColumnsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemColumnsRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionCollectionResponseable), nil
|
||||
}
|
||||
// Post add a column to a [content type][contentType] in a site or list by specifying a [columnDefinition][columnDefinition].
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/contenttype-post-columns?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesItemColumnsRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, requestConfiguration *ItemSitesItemContentTypesItemColumnsRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody provides operations to call the copyToDefaultContentLocation method.
|
||||
type ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody 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 destinationFileName property
|
||||
destinationFileName *string
|
||||
// The sourceFile property
|
||||
sourceFile ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemReferenceable
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody instantiates a new ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody()(*ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) {
|
||||
m := &ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody(), 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 *ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetDestinationFileName gets the destinationFileName property value. The destinationFileName property
|
||||
func (m *ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) GetDestinationFileName()(*string) {
|
||||
return m.destinationFileName
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["destinationFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetStringValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetDestinationFileName(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["sourceFile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateItemReferenceFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetSourceFile(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemReferenceable))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetSourceFile gets the sourceFile property value. The sourceFile property
|
||||
func (m *ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) GetSourceFile()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemReferenceable) {
|
||||
return m.sourceFile
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteStringValue("destinationFileName", m.GetDestinationFileName())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteObjectValue("sourceFile", m.GetSourceFile())
|
||||
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 *ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetDestinationFileName sets the destinationFileName property value. The destinationFileName property
|
||||
func (m *ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) SetDestinationFileName(value *string)() {
|
||||
m.destinationFileName = value
|
||||
}
|
||||
// SetSourceFile sets the sourceFile property value. The sourceFile property
|
||||
func (m *ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBody) SetSourceFile(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemReferenceable)() {
|
||||
m.sourceFile = value
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBodyable
|
||||
type ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetDestinationFileName()(*string)
|
||||
GetSourceFile()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemReferenceable)
|
||||
SetDestinationFileName(value *string)()
|
||||
SetSourceFile(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemReferenceable)()
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder provides operations to call the copyToDefaultContentLocation method.
|
||||
type ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilderInternal instantiates a new CopyToDefaultContentLocationRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/microsoft.graph.copyToDefaultContentLocation";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder instantiates a new CopyToDefaultContentLocationRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation.
|
||||
func (m *ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBodyable, requestConfiguration *ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
|
||||
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
|
||||
requestInfo.UrlTemplate = m.urlTemplate
|
||||
requestInfo.PathParameters = m.pathParameters
|
||||
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
|
||||
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
|
||||
if requestConfiguration != nil {
|
||||
requestInfo.Headers.AddAll(requestConfiguration.Headers)
|
||||
requestInfo.AddRequestOptions(requestConfiguration.Options)
|
||||
}
|
||||
return requestInfo, nil
|
||||
}
|
||||
// Post copy a file to a default content location in a [content type][contentType]. The file can then be added as a default file or template via a POST operation.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/contenttype-copytodefaultcontentlocation?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilder) Post(ctx context.Context, body ItemSitesItemContentTypesItemCopyToDefaultContentLocationPostRequestBodyable, requestConfiguration *ItemSitesItemContentTypesItemCopyToDefaultContentLocationRequestBuilderPostRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreatePostRequestInformation(ctx, body, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemIsPublishedRequestBuilder provides operations to call the isPublished method.
|
||||
type ItemSitesItemContentTypesItemIsPublishedRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemIsPublishedRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemIsPublishedRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemIsPublishedRequestBuilderInternal instantiates a new IsPublishedRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemIsPublishedRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemIsPublishedRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemIsPublishedRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/microsoft.graph.isPublished()";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemIsPublishedRequestBuilder instantiates a new IsPublishedRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemIsPublishedRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemIsPublishedRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemIsPublishedRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation invoke function isPublished
|
||||
func (m *ItemSitesItemContentTypesItemIsPublishedRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemIsPublishedRequestBuilderGetRequestConfiguration)(*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 {
|
||||
requestInfo.Headers.AddAll(requestConfiguration.Headers)
|
||||
requestInfo.AddRequestOptions(requestConfiguration.Options)
|
||||
}
|
||||
return requestInfo, nil
|
||||
}
|
||||
// Get invoke function isPublished
|
||||
func (m *ItemSitesItemContentTypesItemIsPublishedRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemIsPublishedRequestBuilderGetRequestConfiguration)(ItemSitesItemContentTypesItemIsPublishedResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesItemContentTypesItemIsPublishedResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesItemContentTypesItemIsPublishedResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemIsPublishedResponse provides operations to call the isPublished method.
|
||||
type ItemSitesItemContentTypesItemIsPublishedResponse 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 value property
|
||||
value *bool
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemIsPublishedResponse instantiates a new ItemSitesItemContentTypesItemIsPublishedResponse and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemIsPublishedResponse()(*ItemSitesItemContentTypesItemIsPublishedResponse) {
|
||||
m := &ItemSitesItemContentTypesItemIsPublishedResponse{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemContentTypesItemIsPublishedResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemContentTypesItemIsPublishedResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemContentTypesItemIsPublishedResponse(), 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 *ItemSitesItemContentTypesItemIsPublishedResponse) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemContentTypesItemIsPublishedResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetBoolValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetValue(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesItemContentTypesItemIsPublishedResponse) GetValue()(*bool) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemContentTypesItemIsPublishedResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteBoolValue("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 *ItemSitesItemContentTypesItemIsPublishedResponse) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetValue sets the value property value. The value property
|
||||
func (m *ItemSitesItemContentTypesItemIsPublishedResponse) SetValue(value *bool)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemIsPublishedResponseable
|
||||
type ItemSitesItemContentTypesItemIsPublishedResponseable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()(*bool)
|
||||
SetValue(value *bool)()
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemPublishRequestBuilder provides operations to call the publish method.
|
||||
type ItemSitesItemContentTypesItemPublishRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemPublishRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemPublishRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemPublishRequestBuilderInternal instantiates a new PublishRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemPublishRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemPublishRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemPublishRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%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
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemPublishRequestBuilder instantiates a new PublishRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemPublishRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemPublishRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemPublishRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation publishes a [contentType][] present in a content type hub site.
|
||||
func (m *ItemSitesItemContentTypesItemPublishRequestBuilder) CreatePostRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemPublishRequestBuilderPostRequestConfiguration)(*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
|
||||
}
|
||||
// Post publishes a [contentType][] present in a content type hub site.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/contenttype-publish?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesItemPublishRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemPublishRequestBuilderPostRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreatePostRequestInformation(ctx, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesItemUnpublishRequestBuilder provides operations to call the unpublish method.
|
||||
type ItemSitesItemContentTypesItemUnpublishRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesItemUnpublishRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesItemUnpublishRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemUnpublishRequestBuilderInternal instantiates a new UnpublishRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemUnpublishRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemUnpublishRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesItemUnpublishRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes/{contentType%2Did}/microsoft.graph.unpublish";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemContentTypesItemUnpublishRequestBuilder instantiates a new UnpublishRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesItemUnpublishRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesItemUnpublishRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesItemUnpublishRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation unpublish a [contentType][] from a content type hub site.
|
||||
func (m *ItemSitesItemContentTypesItemUnpublishRequestBuilder) CreatePostRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemUnpublishRequestBuilderPostRequestConfiguration)(*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
|
||||
}
|
||||
// Post unpublish a [contentType][] from a content type hub site.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/contenttype-unpublish?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesItemUnpublishRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesItemUnpublishRequestBuilderPostRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreatePostRequestInformation(ctx, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -0,0 +1,162 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemContentTypesRequestBuilder provides operations to manage the contentTypes property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemContentTypesRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemContentTypesRequestBuilderGetQueryParameters get the collection of [contentType][contentType] resources in a [site][].
|
||||
type ItemSitesItemContentTypesRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemContentTypesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemContentTypesRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemContentTypesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemContentTypesRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// AddCopy provides operations to call the addCopy method.
|
||||
func (m *ItemSitesItemContentTypesRequestBuilder) AddCopy()(*ItemSitesItemContentTypesAddCopyRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesAddCopyRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// AddCopyFromContentTypeHub provides operations to call the addCopyFromContentTypeHub method.
|
||||
func (m *ItemSitesItemContentTypesRequestBuilder) AddCopyFromContentTypeHub()(*ItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesAddCopyFromContentTypeHubRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// NewItemSitesItemContentTypesRequestBuilderInternal instantiates a new ContentTypesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesRequestBuilder) {
|
||||
m := &ItemSitesItemContentTypesRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/contentTypes{?%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
|
||||
}
|
||||
// NewItemSitesItemContentTypesRequestBuilder instantiates a new ContentTypesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemContentTypesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemContentTypesRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemContentTypesRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemContentTypesRequestBuilder) Count()(*ItemSitesItemContentTypesCountRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation get the collection of [contentType][contentType] resources in a [site][].
|
||||
func (m *ItemSitesItemContentTypesRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesRequestBuilderGetRequestConfiguration)(*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 a new [contentType][] for a [site][].
|
||||
func (m *ItemSitesItemContentTypesRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, requestConfiguration *ItemSitesItemContentTypesRequestBuilderPostRequestConfiguration)(*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 collection of [contentType][contentType] resources in a [site][].
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/site-list-contenttypes?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemContentTypesRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeCollectionResponseable), nil
|
||||
}
|
||||
// GetCompatibleHubContentTypes provides operations to call the getCompatibleHubContentTypes method.
|
||||
func (m *ItemSitesItemContentTypesRequestBuilder) GetCompatibleHubContentTypes()(*ItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilder) {
|
||||
return NewItemSitesItemContentTypesGetCompatibleHubContentTypesRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// Post create a new [contentType][] for a [site][].
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/site-post-contenttypes?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemContentTypesRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, requestConfiguration *ItemSitesItemContentTypesRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable), nil
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemDriveRequestBuilder provides operations to manage the drive property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemDriveRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemDriveRequestBuilderGetQueryParameters retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries.
|
||||
type ItemSitesItemDriveRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemDriveRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemDriveRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemDriveRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemDriveRequestBuilderInternal instantiates a new DriveRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemDriveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemDriveRequestBuilder) {
|
||||
m := &ItemSitesItemDriveRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/drive{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemDriveRequestBuilder instantiates a new DriveRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemDriveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemDriveRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemDriveRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries.
|
||||
func (m *ItemSitesItemDriveRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemDriveRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/drive-get?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemDriveRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemDriveRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Driveable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDriveFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Driveable), nil
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemDrivesCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemDrivesCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemDrivesCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemDrivesCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemDrivesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemDrivesCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemDrivesCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemDrivesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemDrivesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemDrivesCountRequestBuilder) {
|
||||
m := &ItemSitesItemDrivesCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/drives/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemDrivesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemDrivesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemDrivesCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemDrivesCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemDrivesCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemDrivesCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemDrivesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemDrivesCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemDrivesDriveItemRequestBuilder provides operations to manage the drives property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemDrivesDriveItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemDrivesDriveItemRequestBuilderGetQueryParameters the collection of drives (document libraries) under this site.
|
||||
type ItemSitesItemDrivesDriveItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemDrivesDriveItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemDrivesDriveItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemDrivesDriveItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemDrivesDriveItemRequestBuilderInternal instantiates a new DriveItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemDrivesDriveItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemDrivesDriveItemRequestBuilder) {
|
||||
m := &ItemSitesItemDrivesDriveItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/drives/{drive%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemDrivesDriveItemRequestBuilder instantiates a new DriveItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemDrivesDriveItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemDrivesDriveItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemDrivesDriveItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation the collection of drives (document libraries) under this site.
|
||||
func (m *ItemSitesItemDrivesDriveItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemDrivesDriveItemRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get the collection of drives (document libraries) under this site.
|
||||
func (m *ItemSitesItemDrivesDriveItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemDrivesDriveItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Driveable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDriveFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Driveable), nil
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemDrivesRequestBuilder provides operations to manage the drives property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemDrivesRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemDrivesRequestBuilderGetQueryParameters retrieve the list of Drive resources available for a target User, Group, or Site.
|
||||
type ItemSitesItemDrivesRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemDrivesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemDrivesRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemDrivesRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemDrivesRequestBuilderInternal instantiates a new DrivesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemDrivesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemDrivesRequestBuilder) {
|
||||
m := &ItemSitesItemDrivesRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/drives{?%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
|
||||
}
|
||||
// NewItemSitesItemDrivesRequestBuilder instantiates a new DrivesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemDrivesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemDrivesRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemDrivesRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemDrivesRequestBuilder) Count()(*ItemSitesItemDrivesCountRequestBuilder) {
|
||||
return NewItemSitesItemDrivesCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation retrieve the list of Drive resources available for a target User, Group, or Site.
|
||||
func (m *ItemSitesItemDrivesRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemDrivesRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get retrieve the list of Drive resources available for a target User, Group, or Site.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/drive-list?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemDrivesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemDrivesRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DriveCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDriveCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DriveCollectionResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder provides operations to manage the externalColumns property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderGetQueryParameters the collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site.
|
||||
type ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderInternal instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder) {
|
||||
m := &ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/externalColumns/{columnDefinition%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation the collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site.
|
||||
func (m *ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get the collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site.
|
||||
func (m *ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemExternalColumnsColumnDefinitionItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionable), nil
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemExternalColumnsCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemExternalColumnsCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemExternalColumnsCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemExternalColumnsCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemExternalColumnsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemExternalColumnsCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemExternalColumnsCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemExternalColumnsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemExternalColumnsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemExternalColumnsCountRequestBuilder) {
|
||||
m := &ItemSitesItemExternalColumnsCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/externalColumns/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemExternalColumnsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemExternalColumnsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemExternalColumnsCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemExternalColumnsCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemExternalColumnsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemExternalColumnsCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemExternalColumnsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemExternalColumnsCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemExternalColumnsRequestBuilder provides operations to manage the externalColumns property of the microsoft.graph.site entity.
|
||||
type ItemSitesItemExternalColumnsRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemExternalColumnsRequestBuilderGetQueryParameters the collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site.
|
||||
type ItemSitesItemExternalColumnsRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemExternalColumnsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemExternalColumnsRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemExternalColumnsRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemExternalColumnsRequestBuilderInternal instantiates a new ExternalColumnsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemExternalColumnsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemExternalColumnsRequestBuilder) {
|
||||
m := &ItemSitesItemExternalColumnsRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/externalColumns{?%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
|
||||
}
|
||||
// NewItemSitesItemExternalColumnsRequestBuilder instantiates a new ExternalColumnsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemExternalColumnsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemExternalColumnsRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemExternalColumnsRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemExternalColumnsRequestBuilder) Count()(*ItemSitesItemExternalColumnsCountRequestBuilder) {
|
||||
return NewItemSitesItemExternalColumnsCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation the collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site.
|
||||
func (m *ItemSitesItemExternalColumnsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemExternalColumnsRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get the collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site.
|
||||
func (m *ItemSitesItemExternalColumnsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemExternalColumnsRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateColumnDefinitionCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ColumnDefinitionCollectionResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder provides operations to call the getActivitiesByInterval method.
|
||||
type ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters invoke function getActivitiesByInterval
|
||||
type ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters struct {
|
||||
// Include count of items
|
||||
Count *bool `uriparametername:"%24count"`
|
||||
// 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"`
|
||||
}
|
||||
// ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderInternal instantiates a new GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, endDateTime *string, interval *string, startDateTime *string)(*ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder) {
|
||||
m := &ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/microsoft.graph.getActivitiesByInterval(startDateTime='{startDateTime}',endDateTime='{endDateTime}',interval='{interval}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if endDateTime != nil {
|
||||
urlTplParams["endDateTime"] = *endDateTime
|
||||
}
|
||||
if interval != nil {
|
||||
urlTplParams["interval"] = *interval
|
||||
}
|
||||
if startDateTime != nil {
|
||||
urlTplParams["startDateTime"] = *startDateTime
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder instantiates a new GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderInternal(urlParams, requestAdapter, nil, nil, nil)
|
||||
}
|
||||
// CreateGetRequestInformation invoke function getActivitiesByInterval
|
||||
func (m *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get invoke function getActivitiesByInterval
|
||||
func (m *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration)(ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse provides operations to call the getActivitiesByInterval method.
|
||||
type ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse struct {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse
|
||||
// The value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemActivityStatable
|
||||
}
|
||||
// NewItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse instantiates a new ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse and sets the default values.
|
||||
func NewItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse()(*ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse) {
|
||||
m := &ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse{
|
||||
BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(),
|
||||
}
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(), nil
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateItemActivityStatFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemActivityStatable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemActivityStatable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemActivityStatable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse) 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 *ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemActivityStatable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponseable
|
||||
type ItemSitesItemGetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponseable interface {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemActivityStatable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ItemActivityStatable)()
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder provides operations to call the getApplicableContentTypesForList method.
|
||||
type ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderGetQueryParameters invoke function getApplicableContentTypesForList
|
||||
type ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderGetQueryParameters struct {
|
||||
// Include count of items
|
||||
Count *bool `uriparametername:"%24count"`
|
||||
// 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"`
|
||||
}
|
||||
// ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderInternal instantiates a new GetApplicableContentTypesForListWithListIdRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, listId *string)(*ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder) {
|
||||
m := &ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/microsoft.graph.getApplicableContentTypesForList(listId='{listId}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if listId != nil {
|
||||
urlTplParams["listId"] = *listId
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder instantiates a new GetApplicableContentTypesForListWithListIdRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderInternal(urlParams, requestAdapter, nil)
|
||||
}
|
||||
// CreateGetRequestInformation invoke function getApplicableContentTypesForList
|
||||
func (m *ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get invoke function getApplicableContentTypesForList
|
||||
func (m *ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemGetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration)(ItemSitesItemGetApplicableContentTypesForListWithListIdResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesItemGetApplicableContentTypesForListWithListIdResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesItemGetApplicableContentTypesForListWithListIdResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemGetApplicableContentTypesForListWithListIdResponse provides operations to call the getApplicableContentTypesForList method.
|
||||
type ItemSitesItemGetApplicableContentTypesForListWithListIdResponse struct {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse
|
||||
// The value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable
|
||||
}
|
||||
// NewItemSitesItemGetApplicableContentTypesForListWithListIdResponse instantiates a new ItemSitesItemGetApplicableContentTypesForListWithListIdResponse and sets the default values.
|
||||
func NewItemSitesItemGetApplicableContentTypesForListWithListIdResponse()(*ItemSitesItemGetApplicableContentTypesForListWithListIdResponse) {
|
||||
m := &ItemSitesItemGetApplicableContentTypesForListWithListIdResponse{
|
||||
BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(),
|
||||
}
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemGetApplicableContentTypesForListWithListIdResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemGetApplicableContentTypesForListWithListIdResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemGetApplicableContentTypesForListWithListIdResponse(), nil
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemGetApplicableContentTypesForListWithListIdResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentTypeFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesItemGetApplicableContentTypesForListWithListIdResponse) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemGetApplicableContentTypesForListWithListIdResponse) 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 *ItemSitesItemGetApplicableContentTypesForListWithListIdResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemGetApplicableContentTypesForListWithListIdResponseable
|
||||
type ItemSitesItemGetApplicableContentTypesForListWithListIdResponseable interface {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentTypeable)()
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemGetByPathWithPathRequestBuilder provides operations to call the getByPath method.
|
||||
type ItemSitesItemGetByPathWithPathRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemGetByPathWithPathRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemGetByPathWithPathRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemGetByPathWithPathRequestBuilderInternal instantiates a new GetByPathWithPathRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemGetByPathWithPathRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, path *string)(*ItemSitesItemGetByPathWithPathRequestBuilder) {
|
||||
m := &ItemSitesItemGetByPathWithPathRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/microsoft.graph.getByPath(path='{path}')";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if path != nil {
|
||||
urlTplParams["path"] = *path
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemGetByPathWithPathRequestBuilder instantiates a new GetByPathWithPathRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemGetByPathWithPathRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemGetByPathWithPathRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemGetByPathWithPathRequestBuilderInternal(urlParams, requestAdapter, nil)
|
||||
}
|
||||
// CreateGetRequestInformation invoke function getByPath
|
||||
func (m *ItemSitesItemGetByPathWithPathRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemGetByPathWithPathRequestBuilderGetRequestConfiguration)(*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 {
|
||||
requestInfo.Headers.AddAll(requestConfiguration.Headers)
|
||||
requestInfo.AddRequestOptions(requestConfiguration.Options)
|
||||
}
|
||||
return requestInfo, nil
|
||||
}
|
||||
// Get invoke function getByPath
|
||||
func (m *ItemSitesItemGetByPathWithPathRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemGetByPathWithPathRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateSiteFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable), nil
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder provides operations to manage the recoveryKeys property of the microsoft.graph.bitlocker entity.
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderGetQueryParameters the recovery keys associated with the bitlocker entity.
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderInternal instantiates a new BitlockerRecoveryKeyItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/bitlocker/recoveryKeys/{bitlockerRecoveryKey%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder instantiates a new BitlockerRecoveryKeyItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation the recovery keys associated with the bitlocker entity.
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get the recovery keys associated with the bitlocker entity.
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BitlockerRecoveryKeyable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateBitlockerRecoveryKeyFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BitlockerRecoveryKeyable), nil
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/bitlocker/recoveryKeys/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder provides operations to manage the recoveryKeys property of the microsoft.graph.bitlocker entity.
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderGetQueryParameters get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the **key** property. For information about how to read the **key** property, see Get bitlockerRecoveryKey.
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderInternal instantiates a new RecoveryKeysRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/bitlocker/recoveryKeys{?%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
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder instantiates a new RecoveryKeysRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder) Count()(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilder) {
|
||||
return NewItemSitesItemInformationProtectionBitlockerRecoveryKeysCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the **key** property. For information about how to read the **key** property, see Get bitlockerRecoveryKey.
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get get a list of the bitlockerRecoveryKey objects and their properties. This operation does not return the **key** property. For information about how to read the **key** property, see Get bitlockerRecoveryKey.
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/bitlocker-list-recoverykeys?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BitlockerRecoveryKeyCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateBitlockerRecoveryKeyCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BitlockerRecoveryKeyCollectionResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionBitlockerRequestBuilder provides operations to manage the bitlocker property of the microsoft.graph.informationProtection entity.
|
||||
type ItemSitesItemInformationProtectionBitlockerRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionBitlockerRequestBuilderGetQueryParameters get bitlocker from groups
|
||||
type ItemSitesItemInformationProtectionBitlockerRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemInformationProtectionBitlockerRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionBitlockerRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemInformationProtectionBitlockerRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionBitlockerRequestBuilderInternal instantiates a new BitlockerRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionBitlockerRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionBitlockerRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionBitlockerRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/bitlocker{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionBitlockerRequestBuilder instantiates a new BitlockerRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionBitlockerRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionBitlockerRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionBitlockerRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get bitlocker from groups
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionBitlockerRequestBuilderGetRequestConfiguration)(*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
|
||||
}
|
||||
// Get get bitlocker from groups
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionBitlockerRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Bitlockerable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateBitlockerFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Bitlockerable), nil
|
||||
}
|
||||
// RecoveryKeys provides operations to manage the recoveryKeys property of the microsoft.graph.bitlocker entity.
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRequestBuilder) RecoveryKeys()(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilder) {
|
||||
return NewItemSitesItemInformationProtectionBitlockerRecoveryKeysRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// RecoveryKeysById provides operations to manage the recoveryKeys property of the microsoft.graph.bitlocker entity.
|
||||
func (m *ItemSitesItemInformationProtectionBitlockerRequestBuilder) RecoveryKeysById(id string)(*ItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilder) {
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range m.pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
if id != "" {
|
||||
urlTplParams["bitlockerRecoveryKey%2Did"] = id
|
||||
}
|
||||
return NewItemSitesItemInformationProtectionBitlockerRecoveryKeysBitlockerRecoveryKeyItemRequestBuilderInternal(urlTplParams, m.requestAdapter);
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/dataLossPreventionPolicies/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,163 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder provides operations to manage the dataLossPreventionPolicies property of the microsoft.graph.informationProtection entity.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderDeleteRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderGetQueryParameters get dataLossPreventionPolicies from groups
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderGetQueryParameters struct {
|
||||
// Expand related entities
|
||||
Expand []string `uriparametername:"%24expand"`
|
||||
// Select properties to be returned
|
||||
Select []string `uriparametername:"%24select"`
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderPatchRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderInternal instantiates a new DataLossPreventionPolicyItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/dataLossPreventionPolicies/{dataLossPreventionPolicy%2Did}{?%24select,%24expand}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder instantiates a new DataLossPreventionPolicyItemRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateDeleteRequestInformation delete navigation property dataLossPreventionPolicies for groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderDeleteRequestConfiguration)(*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 get dataLossPreventionPolicies from groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderGetRequestConfiguration)(*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 dataLossPreventionPolicies in groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderPatchRequestConfiguration)(*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 dataLossPreventionPolicies for groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderDeleteRequestConfiguration)(error) {
|
||||
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration);
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
|
||||
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
|
||||
}
|
||||
err = m.requestAdapter.SendNoContentAsync(ctx, requestInfo, errorMapping)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// Get get dataLossPreventionPolicies from groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDataLossPreventionPolicyFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable), nil
|
||||
}
|
||||
// Patch update the navigation property dataLossPreventionPolicies in groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesDataLossPreventionPolicyItemRequestBuilderPatchRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDataLossPreventionPolicyFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable), nil
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody provides operations to call the evaluate method.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody 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 evaluationInput property
|
||||
evaluationInput ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpEvaluationInputable
|
||||
// The notificationInfo property
|
||||
notificationInfo ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpNotificationable
|
||||
// The target property
|
||||
target *string
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody instantiates a new ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody()(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) {
|
||||
m := &ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody(), 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 *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetEvaluationInput gets the evaluationInput property value. The evaluationInput property
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) GetEvaluationInput()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpEvaluationInputable) {
|
||||
return m.evaluationInput
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["evaluationInput"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDlpEvaluationInputFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetEvaluationInput(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpEvaluationInputable))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["notificationInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDlpNotificationFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetNotificationInfo(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpNotificationable))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetStringValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetTarget(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetNotificationInfo gets the notificationInfo property value. The notificationInfo property
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) GetNotificationInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpNotificationable) {
|
||||
return m.notificationInfo
|
||||
}
|
||||
// GetTarget gets the target property value. The target property
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) GetTarget()(*string) {
|
||||
return m.target
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteObjectValue("evaluationInput", m.GetEvaluationInput())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteObjectValue("notificationInfo", m.GetNotificationInfo())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteStringValue("target", m.GetTarget())
|
||||
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 *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetEvaluationInput sets the evaluationInput property value. The evaluationInput property
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) SetEvaluationInput(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpEvaluationInputable)() {
|
||||
m.evaluationInput = value
|
||||
}
|
||||
// SetNotificationInfo sets the notificationInfo property value. The notificationInfo property
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) SetNotificationInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpNotificationable)() {
|
||||
m.notificationInfo = value
|
||||
}
|
||||
// SetTarget sets the target property value. The target property
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBody) SetTarget(value *string)() {
|
||||
m.target = value
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBodyable
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetEvaluationInput()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpEvaluationInputable)
|
||||
GetNotificationInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpNotificationable)
|
||||
GetTarget()(*string)
|
||||
SetEvaluationInput(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpEvaluationInputable)()
|
||||
SetNotificationInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpNotificationable)()
|
||||
SetTarget(value *string)()
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder provides operations to call the evaluate method.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilderInternal instantiates a new EvaluateRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/dataLossPreventionPolicies/microsoft.graph.evaluate";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder instantiates a new EvaluateRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation invoke action evaluate
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilderPostRequestConfiguration)(*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 evaluate
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder) Post(ctx context.Context, body ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluatePostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpEvaluatePoliciesJobResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDlpEvaluatePoliciesJobResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DlpEvaluatePoliciesJobResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,148 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder provides operations to manage the dataLossPreventionPolicies property of the microsoft.graph.informationProtection entity.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderGetQueryParameters get dataLossPreventionPolicies from groups
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderGetQueryParameters 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"`
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderGetQueryParameters
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderInternal instantiates a new DataLossPreventionPoliciesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/dataLossPreventionPolicies{?%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
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder instantiates a new DataLossPreventionPoliciesRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// Count provides operations to count the resources in the collection.
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder) Count()(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilder) {
|
||||
return NewItemSitesItemInformationProtectionDataLossPreventionPoliciesCountRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// CreateGetRequestInformation get dataLossPreventionPolicies from groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderGetRequestConfiguration)(*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 dataLossPreventionPolicies for groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderPostRequestConfiguration)(*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
|
||||
}
|
||||
// Evaluate provides operations to call the evaluate method.
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder) Evaluate()(*ItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilder) {
|
||||
return NewItemSitesItemInformationProtectionDataLossPreventionPoliciesEvaluateRequestBuilderInternal(m.pathParameters, m.requestAdapter);
|
||||
}
|
||||
// Get get dataLossPreventionPolicies from groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderGetRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyCollectionResponseable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDataLossPreventionPolicyCollectionResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyCollectionResponseable), nil
|
||||
}
|
||||
// Post create new navigation property to dataLossPreventionPolicies for groups
|
||||
func (m *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable, requestConfiguration *ItemSitesItemInformationProtectionDataLossPreventionPoliciesRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDataLossPreventionPolicyFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DataLossPreventionPolicyable), nil
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDecryptBufferPostRequestBody provides operations to call the decryptBuffer method.
|
||||
type ItemSitesItemInformationProtectionDecryptBufferPostRequestBody 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 encryptedBuffer property
|
||||
encryptedBuffer []byte
|
||||
// The publishingLicense property
|
||||
publishingLicense []byte
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDecryptBufferPostRequestBody instantiates a new ItemSitesItemInformationProtectionDecryptBufferPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDecryptBufferPostRequestBody()(*ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) {
|
||||
m := &ItemSitesItemInformationProtectionDecryptBufferPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionDecryptBufferPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionDecryptBufferPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionDecryptBufferPostRequestBody(), 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 *ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetEncryptedBuffer gets the encryptedBuffer property value. The encryptedBuffer property
|
||||
func (m *ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) GetEncryptedBuffer()([]byte) {
|
||||
return m.encryptedBuffer
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["encryptedBuffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetByteArrayValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetEncryptedBuffer(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["publishingLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetByteArrayValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetPublishingLicense(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetPublishingLicense gets the publishingLicense property value. The publishingLicense property
|
||||
func (m *ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) GetPublishingLicense()([]byte) {
|
||||
return m.publishingLicense
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteByteArrayValue("encryptedBuffer", m.GetEncryptedBuffer())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteByteArrayValue("publishingLicense", m.GetPublishingLicense())
|
||||
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 *ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetEncryptedBuffer sets the encryptedBuffer property value. The encryptedBuffer property
|
||||
func (m *ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) SetEncryptedBuffer(value []byte)() {
|
||||
m.encryptedBuffer = value
|
||||
}
|
||||
// SetPublishingLicense sets the publishingLicense property value. The publishingLicense property
|
||||
func (m *ItemSitesItemInformationProtectionDecryptBufferPostRequestBody) SetPublishingLicense(value []byte)() {
|
||||
m.publishingLicense = value
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDecryptBufferPostRequestBodyable
|
||||
type ItemSitesItemInformationProtectionDecryptBufferPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetEncryptedBuffer()([]byte)
|
||||
GetPublishingLicense()([]byte)
|
||||
SetEncryptedBuffer(value []byte)()
|
||||
SetPublishingLicense(value []byte)()
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionDecryptBufferRequestBuilder provides operations to call the decryptBuffer method.
|
||||
type ItemSitesItemInformationProtectionDecryptBufferRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionDecryptBufferRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionDecryptBufferRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDecryptBufferRequestBuilderInternal instantiates a new DecryptBufferRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDecryptBufferRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDecryptBufferRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionDecryptBufferRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/microsoft.graph.decryptBuffer";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionDecryptBufferRequestBuilder instantiates a new DecryptBufferRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionDecryptBufferRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionDecryptBufferRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionDecryptBufferRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation invoke action decryptBuffer
|
||||
func (m *ItemSitesItemInformationProtectionDecryptBufferRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemInformationProtectionDecryptBufferPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionDecryptBufferRequestBuilderPostRequestConfiguration)(*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 decryptBuffer
|
||||
func (m *ItemSitesItemInformationProtectionDecryptBufferRequestBuilder) Post(ctx context.Context, body ItemSitesItemInformationProtectionDecryptBufferPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionDecryptBufferRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BufferDecryptionResultable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateBufferDecryptionResultFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BufferDecryptionResultable), nil
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid"
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionEncryptBufferPostRequestBody provides operations to call the encryptBuffer method.
|
||||
type ItemSitesItemInformationProtectionEncryptBufferPostRequestBody 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 buffer property
|
||||
buffer []byte
|
||||
// The labelId property
|
||||
labelId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionEncryptBufferPostRequestBody instantiates a new ItemSitesItemInformationProtectionEncryptBufferPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionEncryptBufferPostRequestBody()(*ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) {
|
||||
m := &ItemSitesItemInformationProtectionEncryptBufferPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionEncryptBufferPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionEncryptBufferPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionEncryptBufferPostRequestBody(), 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 *ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetBuffer gets the buffer property value. The buffer property
|
||||
func (m *ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) GetBuffer()([]byte) {
|
||||
return m.buffer
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["buffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetByteArrayValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetBuffer(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["labelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetUUIDValue()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetLabelId(val)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetLabelId gets the labelId property value. The labelId property
|
||||
func (m *ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) GetLabelId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) {
|
||||
return m.labelId
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteByteArrayValue("buffer", m.GetBuffer())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteUUIDValue("labelId", m.GetLabelId())
|
||||
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 *ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetBuffer sets the buffer property value. The buffer property
|
||||
func (m *ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) SetBuffer(value []byte)() {
|
||||
m.buffer = value
|
||||
}
|
||||
// SetLabelId sets the labelId property value. The labelId property
|
||||
func (m *ItemSitesItemInformationProtectionEncryptBufferPostRequestBody) SetLabelId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() {
|
||||
m.labelId = value
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid"
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionEncryptBufferPostRequestBodyable
|
||||
type ItemSitesItemInformationProtectionEncryptBufferPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetBuffer()([]byte)
|
||||
GetLabelId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)
|
||||
SetBuffer(value []byte)()
|
||||
SetLabelId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)()
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionEncryptBufferRequestBuilder provides operations to call the encryptBuffer method.
|
||||
type ItemSitesItemInformationProtectionEncryptBufferRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionEncryptBufferRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionEncryptBufferRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionEncryptBufferRequestBuilderInternal instantiates a new EncryptBufferRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionEncryptBufferRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionEncryptBufferRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionEncryptBufferRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/microsoft.graph.encryptBuffer";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionEncryptBufferRequestBuilder instantiates a new EncryptBufferRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionEncryptBufferRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionEncryptBufferRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionEncryptBufferRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation invoke action encryptBuffer
|
||||
func (m *ItemSitesItemInformationProtectionEncryptBufferRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemInformationProtectionEncryptBufferPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionEncryptBufferRequestBuilderPostRequestConfiguration)(*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 encryptBuffer
|
||||
func (m *ItemSitesItemInformationProtectionEncryptBufferRequestBuilder) Post(ctx context.Context, body ItemSitesItemInformationProtectionEncryptBufferPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionEncryptBufferRequestBuilderPostRequestConfiguration)(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BufferEncryptionResultable, 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.SendAsync(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateBufferEncryptionResultFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BufferEncryptionResultable), nil
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder provides operations to count the resources in the collection.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderGetQueryParameters get the number of the resource
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderGetQueryParameters struct {
|
||||
// Filter items by property values
|
||||
Filter *string `uriparametername:"%24filter"`
|
||||
// Search items by search phrases
|
||||
Search *string `uriparametername:"%24search"`
|
||||
}
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderGetRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
// Request query parameters
|
||||
QueryParameters *ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderGetQueryParameters
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/policy/labels/$count{?%24search,%24filter}";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreateGetRequestInformation get the number of the resource
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderGetRequestConfiguration)(*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 *ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemInformationProtectionPolicyLabelsCountRequestBuilderGetRequestConfiguration)(*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.SendPrimitiveAsync(ctx, requestInfo, "int32", errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(*int32), nil
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody provides operations to call the evaluateApplication method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody 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 contentInfo property
|
||||
contentInfo ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable
|
||||
// The labelingOptions property
|
||||
labelingOptions ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.LabelingOptionsable
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody instantiates a new ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody()(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody(), 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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetContentInfo gets the contentInfo property value. The contentInfo property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) GetContentInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable) {
|
||||
return m.contentInfo
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["contentInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentInfoFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetContentInfo(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["labelingOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateLabelingOptionsFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetLabelingOptions(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.LabelingOptionsable))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetLabelingOptions gets the labelingOptions property value. The labelingOptions property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) GetLabelingOptions()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.LabelingOptionsable) {
|
||||
return m.labelingOptions
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteObjectValue("contentInfo", m.GetContentInfo())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteObjectValue("labelingOptions", m.GetLabelingOptions())
|
||||
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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetContentInfo sets the contentInfo property value. The contentInfo property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) SetContentInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)() {
|
||||
m.contentInfo = value
|
||||
}
|
||||
// SetLabelingOptions sets the labelingOptions property value. The labelingOptions property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBody) SetLabelingOptions(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.LabelingOptionsable)() {
|
||||
m.labelingOptions = value
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBodyable
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetContentInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)
|
||||
GetLabelingOptions()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.LabelingOptionsable)
|
||||
SetContentInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)()
|
||||
SetLabelingOptions(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.LabelingOptionsable)()
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder provides operations to call the evaluateApplication method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilderInternal instantiates a new EvaluateApplicationRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/policy/labels/microsoft.graph.evaluateApplication";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder instantiates a new EvaluateApplicationRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation compute the information protection label that should be applied and return the set of actions that must be taken to correctly label the information. This API is useful when a label should be set manually or explicitly by a user or service, rather than automatically based on file contents. Given contentInfo, which includes existing content metadata key/value pairs, and labelingOptions as an input, the API returns an informationProtectionAction object that contains one of more of the following:
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilderPostRequestConfiguration)(*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 compute the information protection label that should be applied and return the set of actions that must be taken to correctly label the information. This API is useful when a label should be set manually or explicitly by a user or service, rather than automatically based on file contents. Given contentInfo, which includes existing content metadata key/value pairs, and labelingOptions as an input, the API returns an informationProtectionAction object that contains one of more of the following:
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/informationprotectionlabel-evaluateapplication?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilder) Post(ctx context.Context, body ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationRequestBuilderPostRequestConfiguration)(ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse provides operations to call the evaluateApplication method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse struct {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse
|
||||
// The value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse instantiates a new ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse()(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse{
|
||||
BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(),
|
||||
}
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse(), nil
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateInformationProtectionActionFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse) 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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponseable
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateApplicationResponseable interface {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)()
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody provides operations to call the evaluateClassificationResults method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody 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 classificationResults property
|
||||
classificationResults []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ClassificationResultable
|
||||
// The contentInfo property
|
||||
contentInfo ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody instantiates a new ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody()(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody(), 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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetClassificationResults gets the classificationResults property value. The classificationResults property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) GetClassificationResults()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ClassificationResultable) {
|
||||
return m.classificationResults
|
||||
}
|
||||
// GetContentInfo gets the contentInfo property value. The contentInfo property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) GetContentInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable) {
|
||||
return m.contentInfo
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["classificationResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateClassificationResultFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ClassificationResultable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ClassificationResultable)
|
||||
}
|
||||
m.SetClassificationResults(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["contentInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentInfoFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetContentInfo(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
if m.GetClassificationResults() != nil {
|
||||
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClassificationResults()))
|
||||
for i, v := range m.GetClassificationResults() {
|
||||
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
|
||||
}
|
||||
err := writer.WriteCollectionOfObjectValues("classificationResults", cast)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteObjectValue("contentInfo", m.GetContentInfo())
|
||||
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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetClassificationResults sets the classificationResults property value. The classificationResults property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) SetClassificationResults(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ClassificationResultable)() {
|
||||
m.classificationResults = value
|
||||
}
|
||||
// SetContentInfo sets the contentInfo property value. The contentInfo property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBody) SetContentInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)() {
|
||||
m.contentInfo = value
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBodyable
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetClassificationResults()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ClassificationResultable)
|
||||
GetContentInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)
|
||||
SetClassificationResults(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ClassificationResultable)()
|
||||
SetContentInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)()
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder provides operations to call the evaluateClassificationResults method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilderInternal instantiates a new EvaluateClassificationResultsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/policy/labels/microsoft.graph.evaluateClassificationResults";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder instantiates a new EvaluateClassificationResultsRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation using classification results, compute the information protection label that should be applied and return the set of actions that must be taken to correctly label the information. This API is useful when a label should be set automatically based on classification of the file contents, rather than labeled directly by a user or service. To evaluate based on classification results, provide contentInfo, which includes existing content metadata key/value pairs, and classification results. The API returns an informationProtectionAction that contains one of more of the following:
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilderPostRequestConfiguration)(*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 using classification results, compute the information protection label that should be applied and return the set of actions that must be taken to correctly label the information. This API is useful when a label should be set automatically based on classification of the file contents, rather than labeled directly by a user or service. To evaluate based on classification results, provide contentInfo, which includes existing content metadata key/value pairs, and classification results. The API returns an informationProtectionAction that contains one of more of the following:
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/informationprotectionlabel-evaluateclassificationresults?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilder) Post(ctx context.Context, body ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsRequestBuilderPostRequestConfiguration)(ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse provides operations to call the evaluateClassificationResults method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse struct {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse
|
||||
// The value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse instantiates a new ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse()(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse{
|
||||
BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(),
|
||||
}
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse(), nil
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateInformationProtectionActionFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse) 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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponseable
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateClassificationResultsResponseable interface {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)()
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody provides operations to call the evaluateRemoval method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody 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 contentInfo property
|
||||
contentInfo ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable
|
||||
// The downgradeJustification property
|
||||
downgradeJustification ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DowngradeJustificationable
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody instantiates a new ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody()(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody{
|
||||
}
|
||||
m.SetAdditionalData(make(map[string]interface{}));
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody(), 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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) GetAdditionalData()(map[string]interface{}) {
|
||||
return m.additionalData
|
||||
}
|
||||
// GetContentInfo gets the contentInfo property value. The contentInfo property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) GetContentInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable) {
|
||||
return m.contentInfo
|
||||
}
|
||||
// GetDowngradeJustification gets the downgradeJustification property value. The downgradeJustification property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) GetDowngradeJustification()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DowngradeJustificationable) {
|
||||
return m.downgradeJustification
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
||||
res["contentInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateContentInfoFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetContentInfo(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
res["downgradeJustification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDowngradeJustificationFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
m.SetDowngradeJustification(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DowngradeJustificationable))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
||||
{
|
||||
err := writer.WriteObjectValue("contentInfo", m.GetContentInfo())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
{
|
||||
err := writer.WriteObjectValue("downgradeJustification", m.GetDowngradeJustification())
|
||||
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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) SetAdditionalData(value map[string]interface{})() {
|
||||
m.additionalData = value
|
||||
}
|
||||
// SetContentInfo sets the contentInfo property value. The contentInfo property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) SetContentInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)() {
|
||||
m.contentInfo = value
|
||||
}
|
||||
// SetDowngradeJustification sets the downgradeJustification property value. The downgradeJustification property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBody) SetDowngradeJustification(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DowngradeJustificationable)() {
|
||||
m.downgradeJustification = value
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBodyable
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBodyable interface {
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetContentInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)
|
||||
GetDowngradeJustification()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DowngradeJustificationable)
|
||||
SetContentInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ContentInfoable)()
|
||||
SetDowngradeJustification(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DowngradeJustificationable)()
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
"context"
|
||||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
|
||||
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models/odataerrors"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder provides operations to call the evaluateRemoval method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder 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
|
||||
}
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilderPostRequestConfiguration struct {
|
||||
// Request headers
|
||||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
|
||||
// Request options
|
||||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilderInternal instantiates a new EvaluateRemovalRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder{
|
||||
}
|
||||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/informationProtection/policy/labels/microsoft.graph.evaluateRemoval";
|
||||
urlTplParams := make(map[string]string)
|
||||
for idx, item := range pathParameters {
|
||||
urlTplParams[idx] = item
|
||||
}
|
||||
m.pathParameters = urlTplParams;
|
||||
m.requestAdapter = requestAdapter;
|
||||
return m
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder instantiates a new EvaluateRemovalRequestBuilder and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder) {
|
||||
urlParams := make(map[string]string)
|
||||
urlParams["request-raw-url"] = rawUrl
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilderInternal(urlParams, requestAdapter)
|
||||
}
|
||||
// CreatePostRequestInformation indicate to the consuming application what actions it should take to remove the label information. Given contentInfo as an input, which includes existing content metadata key/value pairs, the API returns an informationProtectionAction that contains some combination of one of more of the following:
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilderPostRequestConfiguration)(*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 indicate to the consuming application what actions it should take to remove the label information. Given contentInfo as an input, which includes existing content metadata key/value pairs, the API returns an informationProtectionAction that contains some combination of one of more of the following:
|
||||
// [Find more info here]
|
||||
//
|
||||
// [Find more info here]: https://docs.microsoft.com/graph/api/informationprotectionlabel-evaluateremoval?view=graph-rest-1.0
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilder) Post(ctx context.Context, body ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalPostRequestBodyable, requestConfiguration *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalRequestBuilderPostRequestConfiguration)(ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponseable, 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.SendAsync(ctx, requestInfo, CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponseFromDiscriminatorValue, errorMapping)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return res.(ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponseable), nil
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse provides operations to call the evaluateRemoval method.
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse struct {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse
|
||||
// The value property
|
||||
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable
|
||||
}
|
||||
// NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse instantiates a new ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse and sets the default values.
|
||||
func NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse()(*ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse) {
|
||||
m := &ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse{
|
||||
BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(),
|
||||
}
|
||||
return m
|
||||
}
|
||||
// CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
||||
func CreateItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
||||
return NewItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse(), nil
|
||||
}
|
||||
// GetFieldDeserializers the deserialization information for the current model
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
||||
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
|
||||
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
||||
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateInformationProtectionActionFromDiscriminatorValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val != nil {
|
||||
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable, len(val))
|
||||
for i, v := range val {
|
||||
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)
|
||||
}
|
||||
m.SetValue(res)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
// GetValue gets the value property value. The value property
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse) GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable) {
|
||||
return m.value
|
||||
}
|
||||
// Serialize serializes information the current object
|
||||
func (m *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse) 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 *ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)() {
|
||||
m.value = value
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package groups
|
||||
|
||||
import (
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
|
||||
)
|
||||
|
||||
// ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponseable
|
||||
type ItemSitesItemInformationProtectionPolicyLabelsEvaluateRemovalResponseable interface {
|
||||
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable
|
||||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
||||
GetValue()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)
|
||||
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.InformationProtectionActionable)()
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user