Skip to content

Commit

Permalink
Merge pull request #634 from microsoftgraph/v1.0/pipelinebuild/130669
Browse files Browse the repository at this point in the history
Generated  models and request builders
  • Loading branch information
baywet authored Dec 19, 2023
2 parents ef5cb24 + 63483a7 commit 4ae88ab
Show file tree
Hide file tree
Showing 89 changed files with 770 additions and 368 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [1.28.0]- 2023-12-19

### Changed

- Weekly generation.

## [1.27.0]- 2023-12-12

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type ItemMembersConversationMemberItemRequestBuilderDeleteRequestConfiguration s
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// ItemMembersConversationMemberItemRequestBuilderGetQueryParameters retrieve a conversationMember from a chat or channel.
// ItemMembersConversationMemberItemRequestBuilderGetQueryParameters retrieve a conversationMember from a chat.
type ItemMembersConversationMemberItemRequestBuilderGetQueryParameters struct {
// Expand related entities
Expand []string `uriparametername:"%24expand"`
Expand Down Expand Up @@ -73,10 +73,10 @@ func (m *ItemMembersConversationMemberItemRequestBuilder) Delete(ctx context.Con
}
return nil
}
// Get retrieve a conversationMember from a chat or channel.
// Get retrieve a conversationMember from a chat.
// [Find more info here]
//
// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0
// [Find more info here]: https://learn.microsoft.com/graph/api/chat-get-members?view=graph-rest-1.0
func (m *ItemMembersConversationMemberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemMembersConversationMemberItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ConversationMemberable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
Expand Down Expand Up @@ -124,7 +124,7 @@ func (m *ItemMembersConversationMemberItemRequestBuilder) ToDeleteRequestInforma
requestInfo.Headers.TryAdd("Accept", "application/json")
return requestInfo, nil
}
// ToGetRequestInformation retrieve a conversationMember from a chat or channel.
// ToGetRequestInformation retrieve a conversationMember from a chat.
func (m *ItemMembersConversationMemberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemMembersConversationMemberItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
Expand Down
6 changes: 3 additions & 3 deletions chats/item_messages_item_replies_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ func (m *ItemMessagesItemRepliesRequestBuilder) Get(ctx context.Context, request
}
return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ChatMessageCollectionResponseable), nil
}
// Post create a new reply to a chatMessage in a specified channel.
// Post send a new reply to a chatMessage in a specified channel.
// [Find more info here]
//
// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messagereply?view=graph-rest-1.0
// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0
func (m *ItemMessagesItemRepliesRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ChatMessageable, requestConfiguration *ItemMessagesItemRepliesRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ChatMessageable, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
Expand Down Expand Up @@ -135,7 +135,7 @@ func (m *ItemMessagesItemRepliesRequestBuilder) ToGetRequestInformation(ctx cont
requestInfo.Headers.TryAdd("Accept", "application/json")
return requestInfo, nil
}
// ToPostRequestInformation create a new reply to a chatMessage in a specified channel.
// ToPostRequestInformation send a new reply to a chatMessage in a specified channel.
func (m *ItemMessagesItemRepliesRequestBuilder) ToPostRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ChatMessageable, requestConfiguration *ItemMessagesItemRepliesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
Expand Down
4 changes: 4 additions & 0 deletions communications/calls_call_item_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ func (m *CallsCallItemRequestBuilder) Redirect()(*CallsItemRedirectRequestBuilde
func (m *CallsCallItemRequestBuilder) Reject()(*CallsItemRejectRequestBuilder) {
return NewCallsItemRejectRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// SendDtmfTones provides operations to call the sendDtmfTones method.
func (m *CallsCallItemRequestBuilder) SendDtmfTones()(*CallsItemSendDtmfTonesRequestBuilder) {
return NewCallsItemSendDtmfTonesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// SubscribeToTone provides operations to call the subscribeToTone method.
func (m *CallsCallItemRequestBuilder) SubscribeToTone()(*CallsItemSubscribeToToneRequestBuilder) {
return NewCallsItemSubscribeToToneRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
Expand Down
189 changes: 189 additions & 0 deletions communications/calls_item_send_dtmf_tones_post_request_body.go
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 communications/calls_item_send_dtmf_tones_request_builder.go
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);
}
Loading

0 comments on commit 4ae88ab

Please sign in to comment.