Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated beta models and request builders #444

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderDelete
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderGetQueryParameters read the properties and relationships of an operationalInsightsConnection object.
// WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderGetQueryParameters read the properties and relationships of a resourceConnection object.
type WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderGetQueryParameters struct {
// Expand related entities
Expand []string `uriparametername:"%24expand"`
Expand Down Expand Up @@ -73,12 +73,12 @@ func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder)
}
return nil
}
// Get read the properties and relationships of an operationalInsightsConnection object.
// Get read the properties and relationships of a resourceConnection object.
// returns a ResourceConnectionable when successful
// returns a ODataError error when the service returns a 4XX or 5XX status code
// [Find more info here]
//
// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-get?view=graph-rest-beta
// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-get?view=graph-rest-beta
func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderGetRequestConfiguration)(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ResourceConnectionable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
Expand Down Expand Up @@ -127,7 +127,7 @@ func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder)
requestInfo.Headers.TryAdd("Accept", "application/json")
return requestInfo, nil
}
// ToGetRequestInformation read the properties and relationships of an operationalInsightsConnection object.
// ToGetRequestInformation read the properties and relationships of a resourceConnection object.
// returns a *RequestInformation when successful
func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ func NewWindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder(rawUrl str
urlParams["request-raw-url"] = rawUrl
return NewWindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderInternal(urlParams, requestAdapter)
}
// Delete delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
// Delete delete an updatableAsset object.
// returns a ODataError error when the service returns a 4XX or 5XX status code
// [Find more info here]
//
// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-delete?view=graph-rest-beta
// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-delete?view=graph-rest-beta
func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderDeleteRequestConfiguration)(error) {
requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);
if err != nil {
Expand Down Expand Up @@ -136,7 +136,7 @@ func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) Patch(ct
}
return res.(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.UpdatableAssetable), nil
}
// ToDeleteRequestInformation delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
// ToDeleteRequestInformation delete an updatableAsset object.
// returns a *RequestInformation when successful
func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewItemGetMemberGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187
urlParams["request-raw-url"] = rawUrl
return NewItemGetMemberGroupsRequestBuilderInternal(urlParams, requestAdapter)
}
// Post return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API.
// Post return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead.
// Deprecated: This method is obsolete. Use PostAsGetMemberGroupsPostResponse instead.
// returns a ItemGetMemberGroupsResponseable when successful
// returns a ODataError error when the service returns a 4XX or 5XX status code
Expand All @@ -54,7 +54,7 @@ func (m *ItemGetMemberGroupsRequestBuilder) Post(ctx context.Context, body ItemG
}
return res.(ItemGetMemberGroupsResponseable), nil
}
// PostAsGetMemberGroupsPostResponse return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API.
// PostAsGetMemberGroupsPostResponse return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead.
// returns a ItemGetMemberGroupsPostResponseable when successful
// returns a ODataError error when the service returns a 4XX or 5XX status code
// [Find more info here]
Expand All @@ -77,7 +77,7 @@ func (m *ItemGetMemberGroupsRequestBuilder) PostAsGetMemberGroupsPostResponse(ct
}
return res.(ItemGetMemberGroupsPostResponseable), nil
}
// ToPostRequestInformation return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API.
// ToPostRequestInformation return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead.
// returns a *RequestInformation when successful
func (m *ItemGetMemberGroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemGetMemberGroupsPostRequestBodyable, requestConfiguration *ItemGetMemberGroupsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
Expand Down
113 changes: 113 additions & 0 deletions administrativeunits/item_restore_post_request_body.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
package administrativeunits

import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store"
)

type ItemRestorePostRequestBody struct {
// Stores model information.
backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore
}
// NewItemRestorePostRequestBody instantiates a new ItemRestorePostRequestBody and sets the default values.
func NewItemRestorePostRequestBody()(*ItemRestorePostRequestBody) {
m := &ItemRestorePostRequestBody{
}
m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance();
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateItemRestorePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateItemRestorePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemRestorePostRequestBody(), 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.
// returns a map[string]any when successful
func (m *ItemRestorePostRequestBody) GetAdditionalData()(map[string]any) {
val , err := m.backingStore.Get("additionalData")
if err != nil {
panic(err)
}
if val == nil {
var value = make(map[string]any);
m.SetAdditionalData(value);
}
return val.(map[string]any)
}
// GetAutoReconcileProxyConflict gets the autoReconcileProxyConflict property value. The autoReconcileProxyConflict property
// returns a *bool when successful
func (m *ItemRestorePostRequestBody) GetAutoReconcileProxyConflict()(*bool) {
val, err := m.GetBackingStore().Get("autoReconcileProxyConflict")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetBackingStore gets the BackingStore property value. Stores model information.
// returns a BackingStore when successful
func (m *ItemRestorePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) {
return m.backingStore
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *ItemRestorePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["autoReconcileProxyConflict"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetAutoReconcileProxyConflict(val)
}
return nil
}
return res
}
// Serialize serializes information the current object
func (m *ItemRestorePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteBoolValue("autoReconcileProxyConflict", m.GetAutoReconcileProxyConflict())
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 *ItemRestorePostRequestBody) SetAdditionalData(value map[string]any)() {
err := m.GetBackingStore().Set("additionalData", value)
if err != nil {
panic(err)
}
}
// SetAutoReconcileProxyConflict sets the autoReconcileProxyConflict property value. The autoReconcileProxyConflict property
func (m *ItemRestorePostRequestBody) SetAutoReconcileProxyConflict(value *bool)() {
err := m.GetBackingStore().Set("autoReconcileProxyConflict", value)
if err != nil {
panic(err)
}
}
// SetBackingStore sets the BackingStore property value. Stores model information.
func (m *ItemRestorePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() {
m.backingStore = value
}
type ItemRestorePostRequestBodyable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetAutoReconcileProxyConflict()(*bool)
GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)
SetAutoReconcileProxyConflict(value *bool)()
SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)()
}
10 changes: 7 additions & 3 deletions administrativeunits/item_restore_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func NewItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26
// [Find more info here]
//
// [Find more info here]: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-beta
func (m *ItemRestoreRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemRestoreRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration);
func (m *ItemRestoreRequestBuilder) Post(ctx context.Context, body ItemRestorePostRequestBodyable, requestConfiguration *ItemRestoreRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
return nil, err
}
Expand All @@ -56,13 +56,17 @@ func (m *ItemRestoreRequestBuilder) Post(ctx context.Context, requestConfigurati
}
// ToPostRequestInformation restore a recently deleted application, externalUserProfile, group, pendingExternalUserProfile, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This isn't applicable to security groups, which are deleted permanently. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
// returns a *RequestInformation when successful
func (m *ItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemRestoreRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
func (m *ItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemRestorePostRequestBodyable, requestConfiguration *ItemRestoreRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
requestInfo.Headers.TryAdd("Accept", "application/json")
err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body)
if err != nil {
return nil, err
}
return requestInfo, nil
}
// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
Expand Down
Loading
Loading