|
| 1 | +package admin |
| 2 | + |
| 3 | +import ( |
| 4 | + "context" |
| 5 | + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" |
| 6 | + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" |
| 7 | + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" |
| 8 | +) |
| 9 | + |
| 10 | +// EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder provides operations to manage the sharedCookies property of the microsoft.graph.browserSiteList entity. |
| 11 | +type EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder struct { |
| 12 | + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder |
| 13 | +} |
| 14 | +// EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. |
| 15 | +type EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderDeleteRequestConfiguration struct { |
| 16 | + // Request headers |
| 17 | + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders |
| 18 | + // Request options |
| 19 | + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption |
| 20 | +} |
| 21 | +// EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderGetQueryParameters get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. |
| 22 | +type EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderGetQueryParameters struct { |
| 23 | + // Expand related entities |
| 24 | + Expand []string `uriparametername:"%24expand"` |
| 25 | + // Select properties to be returned |
| 26 | + Select []string `uriparametername:"%24select"` |
| 27 | +} |
| 28 | +// EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. |
| 29 | +type EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderGetRequestConfiguration struct { |
| 30 | + // Request headers |
| 31 | + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders |
| 32 | + // Request options |
| 33 | + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption |
| 34 | + // Request query parameters |
| 35 | + QueryParameters *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderGetQueryParameters |
| 36 | +} |
| 37 | +// EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. |
| 38 | +type EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderPatchRequestConfiguration struct { |
| 39 | + // Request headers |
| 40 | + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders |
| 41 | + // Request options |
| 42 | + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption |
| 43 | +} |
| 44 | +// NewEdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderInternal instantiates a new EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder and sets the default values. |
| 45 | +func NewEdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) { |
| 46 | + m := &EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder{ |
| 47 | + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sharedCookies/{browserSharedCookie%2Did}{?%24expand,%24select}", pathParameters), |
| 48 | + } |
| 49 | + return m |
| 50 | +} |
| 51 | +// NewEdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder instantiates a new EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder and sets the default values. |
| 52 | +func NewEdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) { |
| 53 | + urlParams := make(map[string]string) |
| 54 | + urlParams["request-raw-url"] = rawUrl |
| 55 | + return NewEdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderInternal(urlParams, requestAdapter) |
| 56 | +} |
| 57 | +// Delete delete a browserSharedCookie from a browserSiteList. |
| 58 | +// returns a ODataError error when the service returns a 4XX or 5XX status code |
| 59 | +// [Find more info here] |
| 60 | +// |
| 61 | +// [Find more info here]: https://learn.microsoft.com/graph/api/browsersitelist-delete-sharedcookies?view=graph-rest-1.0 |
| 62 | +func (m *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderDeleteRequestConfiguration)(error) { |
| 63 | + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); |
| 64 | + if err != nil { |
| 65 | + return err |
| 66 | + } |
| 67 | + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { |
| 68 | + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, |
| 69 | + } |
| 70 | + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) |
| 71 | + if err != nil { |
| 72 | + return err |
| 73 | + } |
| 74 | + return nil |
| 75 | +} |
| 76 | +// Get get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. |
| 77 | +// returns a BrowserSharedCookieable when successful |
| 78 | +// returns a ODataError error when the service returns a 4XX or 5XX status code |
| 79 | +// [Find more info here] |
| 80 | +// |
| 81 | +// [Find more info here]: https://learn.microsoft.com/graph/api/browsersharedcookie-get?view=graph-rest-1.0 |
| 82 | +func (m *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) Get(ctx context.Context, requestConfiguration *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.BrowserSharedCookieable, error) { |
| 83 | + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); |
| 84 | + if err != nil { |
| 85 | + return nil, err |
| 86 | + } |
| 87 | + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { |
| 88 | + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, |
| 89 | + } |
| 90 | + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateBrowserSharedCookieFromDiscriminatorValue, errorMapping) |
| 91 | + if err != nil { |
| 92 | + return nil, err |
| 93 | + } |
| 94 | + if res == nil { |
| 95 | + return nil, nil |
| 96 | + } |
| 97 | + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.BrowserSharedCookieable), nil |
| 98 | +} |
| 99 | +// Patch update the properties of a browserSharedCookie object. |
| 100 | +// returns a BrowserSharedCookieable when successful |
| 101 | +// returns a ODataError error when the service returns a 4XX or 5XX status code |
| 102 | +// [Find more info here] |
| 103 | +// |
| 104 | +// [Find more info here]: https://learn.microsoft.com/graph/api/browsersharedcookie-update?view=graph-rest-1.0 |
| 105 | +func (m *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.BrowserSharedCookieable, requestConfiguration *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.BrowserSharedCookieable, error) { |
| 106 | + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); |
| 107 | + if err != nil { |
| 108 | + return nil, err |
| 109 | + } |
| 110 | + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { |
| 111 | + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, |
| 112 | + } |
| 113 | + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateBrowserSharedCookieFromDiscriminatorValue, errorMapping) |
| 114 | + if err != nil { |
| 115 | + return nil, err |
| 116 | + } |
| 117 | + if res == nil { |
| 118 | + return nil, nil |
| 119 | + } |
| 120 | + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.BrowserSharedCookieable), nil |
| 121 | +} |
| 122 | +// ToDeleteRequestInformation delete a browserSharedCookie from a browserSiteList. |
| 123 | +// returns a *RequestInformation when successful |
| 124 | +func (m *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { |
| 125 | + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) |
| 126 | + if requestConfiguration != nil { |
| 127 | + requestInfo.Headers.AddAll(requestConfiguration.Headers) |
| 128 | + requestInfo.AddRequestOptions(requestConfiguration.Options) |
| 129 | + } |
| 130 | + requestInfo.Headers.TryAdd("Accept", "application/json") |
| 131 | + return requestInfo, nil |
| 132 | +} |
| 133 | +// ToGetRequestInformation get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. |
| 134 | +// returns a *RequestInformation when successful |
| 135 | +func (m *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { |
| 136 | + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) |
| 137 | + if requestConfiguration != nil { |
| 138 | + if requestConfiguration.QueryParameters != nil { |
| 139 | + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) |
| 140 | + } |
| 141 | + requestInfo.Headers.AddAll(requestConfiguration.Headers) |
| 142 | + requestInfo.AddRequestOptions(requestConfiguration.Options) |
| 143 | + } |
| 144 | + requestInfo.Headers.TryAdd("Accept", "application/json") |
| 145 | + return requestInfo, nil |
| 146 | +} |
| 147 | +// ToPatchRequestInformation update the properties of a browserSharedCookie object. |
| 148 | +// returns a *RequestInformation when successful |
| 149 | +func (m *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.BrowserSharedCookieable, requestConfiguration *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { |
| 150 | + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) |
| 151 | + if requestConfiguration != nil { |
| 152 | + requestInfo.Headers.AddAll(requestConfiguration.Headers) |
| 153 | + requestInfo.AddRequestOptions(requestConfiguration.Options) |
| 154 | + } |
| 155 | + requestInfo.Headers.TryAdd("Accept", "application/json") |
| 156 | + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) |
| 157 | + if err != nil { |
| 158 | + return nil, err |
| 159 | + } |
| 160 | + return requestInfo, nil |
| 161 | +} |
| 162 | +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. |
| 163 | +// returns a *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder when successful |
| 164 | +func (m *EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) WithUrl(rawUrl string)(*EdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder) { |
| 165 | + return NewEdgeInternetExplorerModeSiteListsItemSharedCookiesBrowserSharedCookieItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); |
| 166 | +} |
0 commit comments