-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
217 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
pkg/util/graph/graphsdk/applications/item_remove_password_post_request_body.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package applications | ||
|
||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the Apache License 2.0. | ||
|
||
import ( | ||
i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" | ||
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" | ||
) | ||
|
||
// ItemRemovePasswordPostRequestBody | ||
type ItemRemovePasswordPostRequestBody struct { | ||
// Stores model information. | ||
backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore | ||
} | ||
|
||
// NewItemRemovePasswordPostRequestBody instantiates a new ItemRemovePasswordPostRequestBody and sets the default values. | ||
func NewItemRemovePasswordPostRequestBody() *ItemRemovePasswordPostRequestBody { | ||
m := &ItemRemovePasswordPostRequestBody{} | ||
m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance() | ||
return m | ||
} | ||
|
||
// CreateItemRemovePasswordPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value | ||
func CreateItemRemovePasswordPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { | ||
return NewItemRemovePasswordPostRequestBody(), nil | ||
} | ||
|
||
// GetBackingStore gets the backingStore property value. Stores model information. | ||
func (m *ItemRemovePasswordPostRequestBody) GetBackingStore() ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore { | ||
return m.backingStore | ||
} | ||
|
||
// GetFieldDeserializers the deserialization information for the current model | ||
func (m *ItemRemovePasswordPostRequestBody) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) | ||
res["keyId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetUUIDValue() | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
m.SetKeyId(val) | ||
} | ||
return nil | ||
} | ||
return res | ||
} | ||
|
||
// GetKeyId gets the keyId property value. The keyId property | ||
func (m *ItemRemovePasswordPostRequestBody) GetKeyId() *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID { | ||
val, err := m.GetBackingStore().Get("keyId") | ||
if err != nil { | ||
panic(err) | ||
} | ||
if val != nil { | ||
return val.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) | ||
} | ||
return nil | ||
} | ||
|
||
// Serialize serializes information the current object | ||
func (m *ItemRemovePasswordPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { | ||
{ | ||
err := writer.WriteUUIDValue("keyId", m.GetKeyId()) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
return nil | ||
} | ||
|
||
// SetBackingStore sets the backingStore property value. Stores model information. | ||
func (m *ItemRemovePasswordPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { | ||
m.backingStore = value | ||
} | ||
|
||
// SetKeyId sets the keyId property value. The keyId property | ||
func (m *ItemRemovePasswordPostRequestBody) SetKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { | ||
err := m.GetBackingStore().Set("keyId", value) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
|
||
// ItemRemovePasswordPostRequestBodyable | ||
type ItemRemovePasswordPostRequestBodyable interface { | ||
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable | ||
GetBackingStore() ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore | ||
GetKeyId() *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID | ||
SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) | ||
SetKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) | ||
} |
77 changes: 77 additions & 0 deletions
77
pkg/util/graph/graphsdk/applications/item_remove_password_request_builder.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package applications | ||
|
||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the Apache License 2.0. | ||
|
||
import ( | ||
"context" | ||
|
||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" | ||
|
||
i590dfc7f28a1fc5720c211d996119093307169ae10220ddded8912d222cbd376 "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/models/odataerrors" | ||
) | ||
|
||
// ItemRemovePasswordRequestBuilder provides operations to call the removePassword method. | ||
type ItemRemovePasswordRequestBuilder struct { | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder | ||
} | ||
|
||
// ItemRemovePasswordRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. | ||
type ItemRemovePasswordRequestBuilderPostRequestConfiguration struct { | ||
// Request headers | ||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders | ||
// Request options | ||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption | ||
} | ||
|
||
// NewItemRemovePasswordRequestBuilderInternal instantiates a new RemovePasswordRequestBuilder and sets the default values. | ||
func NewItemRemovePasswordRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemRemovePasswordRequestBuilder { | ||
m := &ItemRemovePasswordRequestBuilder{ | ||
BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/applications/{application%2Did}/removePassword", pathParameters), | ||
} | ||
return m | ||
} | ||
|
||
// NewItemRemovePasswordRequestBuilder instantiates a new RemovePasswordRequestBuilder and sets the default values. | ||
func NewItemRemovePasswordRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemRemovePasswordRequestBuilder { | ||
urlParams := make(map[string]string) | ||
urlParams["request-raw-url"] = rawUrl | ||
return NewItemRemovePasswordRequestBuilderInternal(urlParams, requestAdapter) | ||
} | ||
|
||
// Post remove a password from an application. | ||
// [Find more info here] | ||
// | ||
// [Find more info here]: https://learn.microsoft.com/graph/api/application-removepassword?view=graph-rest-1.0 | ||
func (m *ItemRemovePasswordRequestBuilder) Post(ctx context.Context, body ItemRemovePasswordPostRequestBodyable, requestConfiguration *ItemRemovePasswordRequestBuilderPostRequestConfiguration) error { | ||
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration) | ||
if err != nil { | ||
return err | ||
} | ||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{ | ||
"4XX": i590dfc7f28a1fc5720c211d996119093307169ae10220ddded8912d222cbd376.CreateODataErrorFromDiscriminatorValue, | ||
"5XX": i590dfc7f28a1fc5720c211d996119093307169ae10220ddded8912d222cbd376.CreateODataErrorFromDiscriminatorValue, | ||
} | ||
err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
} | ||
|
||
// ToPostRequestInformation remove a password from an application. | ||
func (m *ItemRemovePasswordRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemRemovePasswordPostRequestBodyable, requestConfiguration *ItemRemovePasswordRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { | ||
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() | ||
requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate | ||
requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters | ||
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST | ||
err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) | ||
if err != nil { | ||
return nil, err | ||
} | ||
if requestConfiguration != nil { | ||
requestInfo.Headers.AddAll(requestConfiguration.Headers) | ||
requestInfo.AddRequestOptions(requestConfiguration.Options) | ||
} | ||
return requestInfo, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters