-
Notifications
You must be signed in to change notification settings - Fork 6
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 #62 from microsoftgraph/beta/pipelinebuild/70499
Generated beta models and request builders using Kiota
- Loading branch information
Showing
311 changed files
with
11,184 additions
and
283 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
151 changes: 151 additions & 0 deletions
151
app/calls/item/contentsharingsessions/content_sharing_sessions_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,151 @@ | ||
package contentsharingsessions | ||
|
||
import ( | ||
ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9 "github.com/microsoft/kiota/abstractions/go" | ||
i535684e11b5500196ecb4b5c6634e0651fe2c2f78b6cd0fbe097d3c9029ae7bc "github.com/microsoftgraph/msgraph-beta-sdk-go/models/microsoft/graph" | ||
i428a28d14ab585560ab266716b214a45f45f18468b52fdb0f932c81a7f9706e4 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/microsoft/graph/odataerrors" | ||
i68341c8bce89cd129fe768442df3396b0d82f6a0aed9f38f83498fec363f4003 "github.com/microsoftgraph/msgraph-beta-sdk-go/app/calls/item/contentsharingsessions/count" | ||
) | ||
|
||
// ContentSharingSessionsRequestBuilder provides operations to manage the contentSharingSessions property of the microsoft.graph.call entity. | ||
type ContentSharingSessionsRequestBuilder struct { | ||
// Path parameters for the request | ||
pathParameters map[string]string; | ||
// The request adapter to use to execute the requests. | ||
requestAdapter ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.RequestAdapter; | ||
// Url template to use to build the URL for the current request builder | ||
urlTemplate string; | ||
} | ||
// ContentSharingSessionsRequestBuilderGetOptions options for Get | ||
type ContentSharingSessionsRequestBuilderGetOptions struct { | ||
// Request headers | ||
H map[string]string; | ||
// Request options | ||
O []ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.RequestOption; | ||
// Request query parameters | ||
Q *ContentSharingSessionsRequestBuilderGetQueryParameters; | ||
// Response handler to use in place of the default response handling provided by the core service | ||
ResponseHandler ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.ResponseHandler; | ||
} | ||
// ContentSharingSessionsRequestBuilderGetQueryParameters get contentSharingSessions from app | ||
type ContentSharingSessionsRequestBuilderGetQueryParameters struct { | ||
// Include count of items | ||
Count *bool; | ||
// Expand related entities | ||
Expand []string; | ||
// Filter items by property values | ||
Filter *string; | ||
// Order items by property values | ||
Orderby []string; | ||
// Search items by search phrases | ||
Search *string; | ||
// Select properties to be returned | ||
Select []string; | ||
// Skip the first n items | ||
Skip *int32; | ||
// Show only the first n items | ||
Top *int32; | ||
} | ||
// ContentSharingSessionsRequestBuilderPostOptions options for Post | ||
type ContentSharingSessionsRequestBuilderPostOptions struct { | ||
// | ||
Body i535684e11b5500196ecb4b5c6634e0651fe2c2f78b6cd0fbe097d3c9029ae7bc.ContentSharingSessionable; | ||
// Request headers | ||
H map[string]string; | ||
// Request options | ||
O []ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.RequestOption; | ||
// Response handler to use in place of the default response handling provided by the core service | ||
ResponseHandler ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.ResponseHandler; | ||
} | ||
// NewContentSharingSessionsRequestBuilderInternal instantiates a new ContentSharingSessionsRequestBuilder and sets the default values. | ||
func NewContentSharingSessionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.RequestAdapter)(*ContentSharingSessionsRequestBuilder) { | ||
m := &ContentSharingSessionsRequestBuilder{ | ||
} | ||
m.urlTemplate = "{+baseurl}/app/calls/{call_id}/contentSharingSessions{?top,skip,search,filter,count,orderby,select,expand}"; | ||
urlTplParams := make(map[string]string) | ||
for idx, item := range pathParameters { | ||
urlTplParams[idx] = item | ||
} | ||
m.pathParameters = urlTplParams; | ||
m.requestAdapter = requestAdapter; | ||
return m | ||
} | ||
// NewContentSharingSessionsRequestBuilder instantiates a new ContentSharingSessionsRequestBuilder and sets the default values. | ||
func NewContentSharingSessionsRequestBuilder(rawUrl string, requestAdapter ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.RequestAdapter)(*ContentSharingSessionsRequestBuilder) { | ||
urlParams := make(map[string]string) | ||
urlParams["request-raw-url"] = rawUrl | ||
return NewContentSharingSessionsRequestBuilderInternal(urlParams, requestAdapter) | ||
} | ||
func (m *ContentSharingSessionsRequestBuilder) Count()(*i68341c8bce89cd129fe768442df3396b0d82f6a0aed9f38f83498fec363f4003.CountRequestBuilder) { | ||
return i68341c8bce89cd129fe768442df3396b0d82f6a0aed9f38f83498fec363f4003.NewCountRequestBuilderInternal(m.pathParameters, m.requestAdapter); | ||
} | ||
// CreateGetRequestInformation get contentSharingSessions from app | ||
func (m *ContentSharingSessionsRequestBuilder) CreateGetRequestInformation(options *ContentSharingSessionsRequestBuilderGetOptions)(*ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.RequestInformation, error) { | ||
requestInfo := ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.NewRequestInformation() | ||
requestInfo.UrlTemplate = m.urlTemplate | ||
requestInfo.PathParameters = m.pathParameters | ||
requestInfo.Method = ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.GET | ||
if options != nil && options.Q != nil { | ||
requestInfo.AddQueryParameters(*(options.Q)) | ||
} | ||
if options != nil && options.H != nil { | ||
requestInfo.Headers = options.H | ||
} | ||
if options != nil && len(options.O) != 0 { | ||
err := requestInfo.AddRequestOptions(options.O...) | ||
if err != nil { | ||
return nil, err | ||
} | ||
} | ||
return requestInfo, nil | ||
} | ||
// CreatePostRequestInformation create new navigation property to contentSharingSessions for app | ||
func (m *ContentSharingSessionsRequestBuilder) CreatePostRequestInformation(options *ContentSharingSessionsRequestBuilderPostOptions)(*ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.RequestInformation, error) { | ||
requestInfo := ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.NewRequestInformation() | ||
requestInfo.UrlTemplate = m.urlTemplate | ||
requestInfo.PathParameters = m.pathParameters | ||
requestInfo.Method = ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.POST | ||
requestInfo.SetContentFromParsable(m.requestAdapter, "application/json", options.Body) | ||
if options != nil && options.H != nil { | ||
requestInfo.Headers = options.H | ||
} | ||
if options != nil && len(options.O) != 0 { | ||
err := requestInfo.AddRequestOptions(options.O...) | ||
if err != nil { | ||
return nil, err | ||
} | ||
} | ||
return requestInfo, nil | ||
} | ||
// Get get contentSharingSessions from app | ||
func (m *ContentSharingSessionsRequestBuilder) Get(options *ContentSharingSessionsRequestBuilderGetOptions)(i535684e11b5500196ecb4b5c6634e0651fe2c2f78b6cd0fbe097d3c9029ae7bc.ContentSharingSessionCollectionResponseable, error) { | ||
requestInfo, err := m.CreateGetRequestInformation(options); | ||
if err != nil { | ||
return nil, err | ||
} | ||
errorMapping := ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.ErrorMappings { | ||
"4XX": i428a28d14ab585560ab266716b214a45f45f18468b52fdb0f932c81a7f9706e4.CreateODataErrorFromDiscriminatorValue, | ||
"5XX": i428a28d14ab585560ab266716b214a45f45f18468b52fdb0f932c81a7f9706e4.CreateODataErrorFromDiscriminatorValue, | ||
} | ||
res, err := m.requestAdapter.SendAsync(requestInfo, i535684e11b5500196ecb4b5c6634e0651fe2c2f78b6cd0fbe097d3c9029ae7bc.CreateContentSharingSessionCollectionResponseFromDiscriminatorValue, nil, errorMapping) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return res.(i535684e11b5500196ecb4b5c6634e0651fe2c2f78b6cd0fbe097d3c9029ae7bc.ContentSharingSessionCollectionResponseable), nil | ||
} | ||
// Post create new navigation property to contentSharingSessions for app | ||
func (m *ContentSharingSessionsRequestBuilder) Post(options *ContentSharingSessionsRequestBuilderPostOptions)(i535684e11b5500196ecb4b5c6634e0651fe2c2f78b6cd0fbe097d3c9029ae7bc.ContentSharingSessionable, error) { | ||
requestInfo, err := m.CreatePostRequestInformation(options); | ||
if err != nil { | ||
return nil, err | ||
} | ||
errorMapping := ida96af0f171bb75f894a4013a6b3146a4397c58f11adb81a2b7cbea9314783a9.ErrorMappings { | ||
"4XX": i428a28d14ab585560ab266716b214a45f45f18468b52fdb0f932c81a7f9706e4.CreateODataErrorFromDiscriminatorValue, | ||
"5XX": i428a28d14ab585560ab266716b214a45f45f18468b52fdb0f932c81a7f9706e4.CreateODataErrorFromDiscriminatorValue, | ||
} | ||
res, err := m.requestAdapter.SendAsync(requestInfo, i535684e11b5500196ecb4b5c6634e0651fe2c2f78b6cd0fbe097d3c9029ae7bc.CreateContentSharingSessionFromDiscriminatorValue, nil, errorMapping) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return res.(i535684e11b5500196ecb4b5c6634e0651fe2c2f78b6cd0fbe097d3c9029ae7bc.ContentSharingSessionable), nil | ||
} |
Oops, something went wrong.