-
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 #202 from microsoftgraph/v1.0/pipelinebuild/77879
Generated v1.0 models and request builders using Kiota
- Loading branch information
Showing
147 changed files
with
11,507 additions
and
57 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
109 changes: 109 additions & 0 deletions
109
groups/item/team/allchannels/all_channels_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,109 @@ | ||
package allchannels | ||
|
||
import ( | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" | ||
iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" | ||
ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" | ||
iedee6168b678e5fba68c1fae62599145f7be0ac4b470c8e0bca81786e297a6a5 "github.com/microsoftgraph/msgraph-sdk-go/groups/item/team/allchannels/count" | ||
) | ||
|
||
// AllChannelsRequestBuilder provides operations to manage the allChannels property of the microsoft.graph.team entity. | ||
type AllChannelsRequestBuilder struct { | ||
// Path parameters for the request | ||
pathParameters map[string]string | ||
// The request adapter to use to execute the requests. | ||
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter | ||
// Url template to use to build the URL for the current request builder | ||
urlTemplate string | ||
} | ||
// AllChannelsRequestBuilderGetQueryParameters list of channels either hosted in or shared with the team (incoming channels). | ||
type AllChannelsRequestBuilderGetQueryParameters struct { | ||
// Include count of items | ||
Count *bool `uriparametername:"%24count"` | ||
// Expand related entities | ||
Expand []string `uriparametername:"%24expand"` | ||
// Filter items by property values | ||
Filter *string `uriparametername:"%24filter"` | ||
// Order items by property values | ||
Orderby []string `uriparametername:"%24orderby"` | ||
// Search items by search phrases | ||
Search *string `uriparametername:"%24search"` | ||
// Select properties to be returned | ||
Select []string `uriparametername:"%24select"` | ||
// Skip the first n items | ||
Skip *int32 `uriparametername:"%24skip"` | ||
// Show only the first n items | ||
Top *int32 `uriparametername:"%24top"` | ||
} | ||
// AllChannelsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. | ||
type AllChannelsRequestBuilderGetRequestConfiguration struct { | ||
// Request headers | ||
Headers map[string]string | ||
// Request options | ||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption | ||
// Request query parameters | ||
QueryParameters *AllChannelsRequestBuilderGetQueryParameters | ||
} | ||
// NewAllChannelsRequestBuilderInternal instantiates a new AllChannelsRequestBuilder and sets the default values. | ||
func NewAllChannelsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AllChannelsRequestBuilder) { | ||
m := &AllChannelsRequestBuilder{ | ||
} | ||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/team/allChannels{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; | ||
urlTplParams := make(map[string]string) | ||
for idx, item := range pathParameters { | ||
urlTplParams[idx] = item | ||
} | ||
m.pathParameters = urlTplParams; | ||
m.requestAdapter = requestAdapter; | ||
return m | ||
} | ||
// NewAllChannelsRequestBuilder instantiates a new AllChannelsRequestBuilder and sets the default values. | ||
func NewAllChannelsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AllChannelsRequestBuilder) { | ||
urlParams := make(map[string]string) | ||
urlParams["request-raw-url"] = rawUrl | ||
return NewAllChannelsRequestBuilderInternal(urlParams, requestAdapter) | ||
} | ||
// Count the count property | ||
func (m *AllChannelsRequestBuilder) Count()(*iedee6168b678e5fba68c1fae62599145f7be0ac4b470c8e0bca81786e297a6a5.CountRequestBuilder) { | ||
return iedee6168b678e5fba68c1fae62599145f7be0ac4b470c8e0bca81786e297a6a5.NewCountRequestBuilderInternal(m.pathParameters, m.requestAdapter); | ||
} | ||
// CreateGetRequestInformation list of channels either hosted in or shared with the team (incoming channels). | ||
func (m *AllChannelsRequestBuilder) CreateGetRequestInformation()(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { | ||
return m.CreateGetRequestInformationWithRequestConfiguration(nil); | ||
} | ||
// CreateGetRequestInformationWithRequestConfiguration list of channels either hosted in or shared with the team (incoming channels). | ||
func (m *AllChannelsRequestBuilder) CreateGetRequestInformationWithRequestConfiguration(requestConfiguration *AllChannelsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { | ||
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() | ||
requestInfo.UrlTemplate = m.urlTemplate | ||
requestInfo.PathParameters = m.pathParameters | ||
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET | ||
requestInfo.Headers["Accept"] = "application/json" | ||
if requestConfiguration != nil { | ||
if requestConfiguration.QueryParameters != nil { | ||
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) | ||
} | ||
requestInfo.AddRequestHeaders(requestConfiguration.Headers) | ||
requestInfo.AddRequestOptions(requestConfiguration.Options) | ||
} | ||
return requestInfo, nil | ||
} | ||
// Get list of channels either hosted in or shared with the team (incoming channels). | ||
func (m *AllChannelsRequestBuilder) Get()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ChannelCollectionResponseable, error) { | ||
return m.GetWithRequestConfigurationAndResponseHandler(nil, nil); | ||
} | ||
// GetWithRequestConfigurationAndResponseHandler list of channels either hosted in or shared with the team (incoming channels). | ||
func (m *AllChannelsRequestBuilder) GetWithRequestConfigurationAndResponseHandler(requestConfiguration *AllChannelsRequestBuilderGetRequestConfiguration, responseHandler i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ResponseHandler)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ChannelCollectionResponseable, error) { | ||
requestInfo, err := m.CreateGetRequestInformationWithRequestConfiguration(requestConfiguration); | ||
if err != nil { | ||
return nil, err | ||
} | ||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { | ||
"4XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, | ||
"5XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, | ||
} | ||
res, err := m.requestAdapter.SendAsync(requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateChannelCollectionResponseFromDiscriminatorValue, responseHandler, errorMapping) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.ChannelCollectionResponseable), nil | ||
} |
79 changes: 79 additions & 0 deletions
79
groups/item/team/allchannels/count/count_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,79 @@ | ||
package count | ||
|
||
import ( | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" | ||
ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" | ||
) | ||
|
||
// CountRequestBuilder provides operations to count the resources in the collection. | ||
type CountRequestBuilder struct { | ||
// Path parameters for the request | ||
pathParameters map[string]string | ||
// The request adapter to use to execute the requests. | ||
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter | ||
// Url template to use to build the URL for the current request builder | ||
urlTemplate string | ||
} | ||
// CountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. | ||
type CountRequestBuilderGetRequestConfiguration struct { | ||
// Request headers | ||
Headers map[string]string | ||
// Request options | ||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption | ||
} | ||
// NewCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. | ||
func NewCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CountRequestBuilder) { | ||
m := &CountRequestBuilder{ | ||
} | ||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/team/allChannels/$count"; | ||
urlTplParams := make(map[string]string) | ||
for idx, item := range pathParameters { | ||
urlTplParams[idx] = item | ||
} | ||
m.pathParameters = urlTplParams; | ||
m.requestAdapter = requestAdapter; | ||
return m | ||
} | ||
// NewCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. | ||
func NewCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CountRequestBuilder) { | ||
urlParams := make(map[string]string) | ||
urlParams["request-raw-url"] = rawUrl | ||
return NewCountRequestBuilderInternal(urlParams, requestAdapter) | ||
} | ||
// CreateGetRequestInformation get the number of the resource | ||
func (m *CountRequestBuilder) CreateGetRequestInformation()(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { | ||
return m.CreateGetRequestInformationWithRequestConfiguration(nil); | ||
} | ||
// CreateGetRequestInformationWithRequestConfiguration get the number of the resource | ||
func (m *CountRequestBuilder) CreateGetRequestInformationWithRequestConfiguration(requestConfiguration *CountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { | ||
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() | ||
requestInfo.UrlTemplate = m.urlTemplate | ||
requestInfo.PathParameters = m.pathParameters | ||
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET | ||
requestInfo.Headers["Accept"] = "text/plain" | ||
if requestConfiguration != nil { | ||
requestInfo.AddRequestHeaders(requestConfiguration.Headers) | ||
requestInfo.AddRequestOptions(requestConfiguration.Options) | ||
} | ||
return requestInfo, nil | ||
} | ||
// Get get the number of the resource | ||
func (m *CountRequestBuilder) Get()(*int32, error) { | ||
return m.GetWithRequestConfigurationAndResponseHandler(nil, nil); | ||
} | ||
// GetWithRequestConfigurationAndResponseHandler get the number of the resource | ||
func (m *CountRequestBuilder) GetWithRequestConfigurationAndResponseHandler(requestConfiguration *CountRequestBuilderGetRequestConfiguration, responseHandler i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ResponseHandler)(*int32, error) { | ||
requestInfo, err := m.CreateGetRequestInformationWithRequestConfiguration(requestConfiguration); | ||
if err != nil { | ||
return nil, err | ||
} | ||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { | ||
"4XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, | ||
"5XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, | ||
} | ||
res, err := m.requestAdapter.SendPrimitiveAsync(requestInfo, "int32", responseHandler, errorMapping) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return res.(*int32), nil | ||
} |
92 changes: 92 additions & 0 deletions
92
groups/item/team/allchannels/item/channel_item_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,92 @@ | ||
package item | ||
|
||
import ( | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" | ||
iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" | ||
ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" | ||
) | ||
|
||
// ChannelItemRequestBuilder provides operations to manage the allChannels property of the microsoft.graph.team entity. | ||
type ChannelItemRequestBuilder struct { | ||
// Path parameters for the request | ||
pathParameters map[string]string | ||
// The request adapter to use to execute the requests. | ||
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter | ||
// Url template to use to build the URL for the current request builder | ||
urlTemplate string | ||
} | ||
// ChannelItemRequestBuilderGetQueryParameters list of channels either hosted in or shared with the team (incoming channels). | ||
type ChannelItemRequestBuilderGetQueryParameters struct { | ||
// Expand related entities | ||
Expand []string `uriparametername:"%24expand"` | ||
// Select properties to be returned | ||
Select []string `uriparametername:"%24select"` | ||
} | ||
// ChannelItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. | ||
type ChannelItemRequestBuilderGetRequestConfiguration struct { | ||
// Request headers | ||
Headers map[string]string | ||
// Request options | ||
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption | ||
// Request query parameters | ||
QueryParameters *ChannelItemRequestBuilderGetQueryParameters | ||
} | ||
// NewChannelItemRequestBuilderInternal instantiates a new ChannelItemRequestBuilder and sets the default values. | ||
func NewChannelItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ChannelItemRequestBuilder) { | ||
m := &ChannelItemRequestBuilder{ | ||
} | ||
m.urlTemplate = "{+baseurl}/groups/{group%2Did}/team/allChannels/{channel%2Did}{?%24select,%24expand}"; | ||
urlTplParams := make(map[string]string) | ||
for idx, item := range pathParameters { | ||
urlTplParams[idx] = item | ||
} | ||
m.pathParameters = urlTplParams; | ||
m.requestAdapter = requestAdapter; | ||
return m | ||
} | ||
// NewChannelItemRequestBuilder instantiates a new ChannelItemRequestBuilder and sets the default values. | ||
func NewChannelItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ChannelItemRequestBuilder) { | ||
urlParams := make(map[string]string) | ||
urlParams["request-raw-url"] = rawUrl | ||
return NewChannelItemRequestBuilderInternal(urlParams, requestAdapter) | ||
} | ||
// CreateGetRequestInformation list of channels either hosted in or shared with the team (incoming channels). | ||
func (m *ChannelItemRequestBuilder) CreateGetRequestInformation()(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { | ||
return m.CreateGetRequestInformationWithRequestConfiguration(nil); | ||
} | ||
// CreateGetRequestInformationWithRequestConfiguration list of channels either hosted in or shared with the team (incoming channels). | ||
func (m *ChannelItemRequestBuilder) CreateGetRequestInformationWithRequestConfiguration(requestConfiguration *ChannelItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { | ||
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() | ||
requestInfo.UrlTemplate = m.urlTemplate | ||
requestInfo.PathParameters = m.pathParameters | ||
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET | ||
requestInfo.Headers["Accept"] = "application/json" | ||
if requestConfiguration != nil { | ||
if requestConfiguration.QueryParameters != nil { | ||
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) | ||
} | ||
requestInfo.AddRequestHeaders(requestConfiguration.Headers) | ||
requestInfo.AddRequestOptions(requestConfiguration.Options) | ||
} | ||
return requestInfo, nil | ||
} | ||
// Get list of channels either hosted in or shared with the team (incoming channels). | ||
func (m *ChannelItemRequestBuilder) Get()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Channelable, error) { | ||
return m.GetWithRequestConfigurationAndResponseHandler(nil, nil); | ||
} | ||
// GetWithRequestConfigurationAndResponseHandler list of channels either hosted in or shared with the team (incoming channels). | ||
func (m *ChannelItemRequestBuilder) GetWithRequestConfigurationAndResponseHandler(requestConfiguration *ChannelItemRequestBuilderGetRequestConfiguration, responseHandler i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ResponseHandler)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Channelable, error) { | ||
requestInfo, err := m.CreateGetRequestInformationWithRequestConfiguration(requestConfiguration); | ||
if err != nil { | ||
return nil, err | ||
} | ||
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { | ||
"4XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, | ||
"5XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, | ||
} | ||
res, err := m.requestAdapter.SendAsync(requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateChannelFromDiscriminatorValue, responseHandler, errorMapping) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Channelable), nil | ||
} |
Oops, something went wrong.