-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #634 from microsoftgraph/v1.0/pipelinebuild/130669
Generated models and request builders
- Loading branch information
Showing
89 changed files
with
770 additions
and
368 deletions.
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
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
189 changes: 189 additions & 0 deletions
189
communications/calls_item_send_dtmf_tones_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,189 @@ | ||
package communications | ||
|
||
import ( | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" | ||
iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" | ||
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" | ||
) | ||
|
||
// CallsItemSendDtmfTonesPostRequestBody | ||
type CallsItemSendDtmfTonesPostRequestBody struct { | ||
// Stores model information. | ||
backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore | ||
} | ||
// NewCallsItemSendDtmfTonesPostRequestBody instantiates a new CallsItemSendDtmfTonesPostRequestBody and sets the default values. | ||
func NewCallsItemSendDtmfTonesPostRequestBody()(*CallsItemSendDtmfTonesPostRequestBody) { | ||
m := &CallsItemSendDtmfTonesPostRequestBody{ | ||
} | ||
m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); | ||
m.SetAdditionalData(make(map[string]any)) | ||
return m | ||
} | ||
// CreateCallsItemSendDtmfTonesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value | ||
func CreateCallsItemSendDtmfTonesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { | ||
return NewCallsItemSendDtmfTonesPostRequestBody(), 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 *CallsItemSendDtmfTonesPostRequestBody) 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) | ||
} | ||
// GetBackingStore gets the BackingStore property value. Stores model information. | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { | ||
return m.backingStore | ||
} | ||
// GetClientContext gets the clientContext property value. The clientContext property | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) GetClientContext()(*string) { | ||
val, err := m.GetBackingStore().Get("clientContext") | ||
if err != nil { | ||
panic(err) | ||
} | ||
if val != nil { | ||
return val.(*string) | ||
} | ||
return nil | ||
} | ||
// GetDelayBetweenTonesMs gets the delayBetweenTonesMs property value. The delayBetweenTonesMs property | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) GetDelayBetweenTonesMs()(*int32) { | ||
val, err := m.GetBackingStore().Get("delayBetweenTonesMs") | ||
if err != nil { | ||
panic(err) | ||
} | ||
if val != nil { | ||
return val.(*int32) | ||
} | ||
return nil | ||
} | ||
// GetFieldDeserializers the deserialization information for the current model | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { | ||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) | ||
res["clientContext"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetStringValue() | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
m.SetClientContext(val) | ||
} | ||
return nil | ||
} | ||
res["delayBetweenTonesMs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetInt32Value() | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
m.SetDelayBetweenTonesMs(val) | ||
} | ||
return nil | ||
} | ||
res["tones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetCollectionOfEnumValues(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ParseTone) | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
res := make([]iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Tone, len(val)) | ||
for i, v := range val { | ||
if v != nil { | ||
res[i] = *(v.(*iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Tone)) | ||
} | ||
} | ||
m.SetTones(res) | ||
} | ||
return nil | ||
} | ||
return res | ||
} | ||
// GetTones gets the tones property value. The tones property | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) GetTones()([]iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Tone) { | ||
val, err := m.GetBackingStore().Get("tones") | ||
if err != nil { | ||
panic(err) | ||
} | ||
if val != nil { | ||
return val.([]iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Tone) | ||
} | ||
return nil | ||
} | ||
// Serialize serializes information the current object | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { | ||
{ | ||
err := writer.WriteStringValue("clientContext", m.GetClientContext()) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
{ | ||
err := writer.WriteInt32Value("delayBetweenTonesMs", m.GetDelayBetweenTonesMs()) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
if m.GetTones() != nil { | ||
err := writer.WriteCollectionOfStringValues("tones", iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SerializeTone(m.GetTones())) | ||
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 *CallsItemSendDtmfTonesPostRequestBody) SetAdditionalData(value map[string]any)() { | ||
err := m.GetBackingStore().Set("additionalData", value) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
// SetBackingStore sets the BackingStore property value. Stores model information. | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { | ||
m.backingStore = value | ||
} | ||
// SetClientContext sets the clientContext property value. The clientContext property | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) SetClientContext(value *string)() { | ||
err := m.GetBackingStore().Set("clientContext", value) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
// SetDelayBetweenTonesMs sets the delayBetweenTonesMs property value. The delayBetweenTonesMs property | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) SetDelayBetweenTonesMs(value *int32)() { | ||
err := m.GetBackingStore().Set("delayBetweenTonesMs", value) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
// SetTones sets the tones property value. The tones property | ||
func (m *CallsItemSendDtmfTonesPostRequestBody) SetTones(value []iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Tone)() { | ||
err := m.GetBackingStore().Set("tones", value) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
// CallsItemSendDtmfTonesPostRequestBodyable | ||
type CallsItemSendDtmfTonesPostRequestBodyable interface { | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder | ||
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable | ||
GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) | ||
GetClientContext()(*string) | ||
GetDelayBetweenTonesMs()(*int32) | ||
GetTones()([]iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Tone) | ||
SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() | ||
SetClientContext(value *string)() | ||
SetDelayBetweenTonesMs(value *int32)() | ||
SetTones(value []iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Tone)() | ||
} |
70 changes: 70 additions & 0 deletions
70
communications/calls_item_send_dtmf_tones_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,70 @@ | ||
package communications | ||
|
||
import ( | ||
"context" | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" | ||
iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" | ||
ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" | ||
) | ||
|
||
// CallsItemSendDtmfTonesRequestBuilder provides operations to call the sendDtmfTones method. | ||
type CallsItemSendDtmfTonesRequestBuilder struct { | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder | ||
} | ||
// CallsItemSendDtmfTonesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. | ||
type CallsItemSendDtmfTonesRequestBuilderPostRequestConfiguration struct { | ||
// Request headers | ||
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders | ||
// Request options | ||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption | ||
} | ||
// NewCallsItemSendDtmfTonesRequestBuilderInternal instantiates a new SendDtmfTonesRequestBuilder and sets the default values. | ||
func NewCallsItemSendDtmfTonesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CallsItemSendDtmfTonesRequestBuilder) { | ||
m := &CallsItemSendDtmfTonesRequestBuilder{ | ||
BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/communications/calls/{call%2Did}/sendDtmfTones", pathParameters), | ||
} | ||
return m | ||
} | ||
// NewCallsItemSendDtmfTonesRequestBuilder instantiates a new SendDtmfTonesRequestBuilder and sets the default values. | ||
func NewCallsItemSendDtmfTonesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CallsItemSendDtmfTonesRequestBuilder) { | ||
urlParams := make(map[string]string) | ||
urlParams["request-raw-url"] = rawUrl | ||
return NewCallsItemSendDtmfTonesRequestBuilderInternal(urlParams, requestAdapter) | ||
} | ||
// Post invoke action sendDtmfTones | ||
func (m *CallsItemSendDtmfTonesRequestBuilder) Post(ctx context.Context, body CallsItemSendDtmfTonesPostRequestBodyable, requestConfiguration *CallsItemSendDtmfTonesRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SendDtmfTonesOperationable, error) { | ||
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); | ||
if err != nil { | ||
return nil, err | ||
} | ||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { | ||
"4XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, | ||
"5XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, | ||
} | ||
res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateSendDtmfTonesOperationFromDiscriminatorValue, errorMapping) | ||
if err != nil { | ||
return nil, err | ||
} | ||
if res == nil { | ||
return nil, nil | ||
} | ||
return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SendDtmfTonesOperationable), nil | ||
} | ||
// ToPostRequestInformation invoke action sendDtmfTones | ||
func (m *CallsItemSendDtmfTonesRequestBuilder) ToPostRequestInformation(ctx context.Context, body CallsItemSendDtmfTonesPostRequestBodyable, requestConfiguration *CallsItemSendDtmfTonesRequestBuilderPostRequestConfiguration)(*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. | ||
func (m *CallsItemSendDtmfTonesRequestBuilder) WithUrl(rawUrl string)(*CallsItemSendDtmfTonesRequestBuilder) { | ||
return NewCallsItemSendDtmfTonesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); | ||
} |
Oops, something went wrong.