Skip to content

Commit 929be22

Browse files
authored
Merge pull request #2108 from microsoftgraph/v1.0/pipelinebuild/159048
Generated models and request builders
2 parents a69162f + 988ab72 commit 929be22

File tree

1,709 files changed

+18352
-184906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,709 files changed

+18352
-184906
lines changed

src/main/java/com/microsoft/graph/generated/admin/people/PeopleRequestBuilder.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.microsoft.graph.admin.people;
22

3+
import com.microsoft.graph.admin.people.iteminsights.ItemInsightsRequestBuilder;
34
import com.microsoft.graph.admin.people.profilecardproperties.ProfileCardPropertiesRequestBuilder;
45
import com.microsoft.graph.admin.people.pronouns.PronounsRequestBuilder;
56
import com.microsoft.graph.models.odataerrors.ODataError;
@@ -22,6 +23,14 @@
2223
*/
2324
@jakarta.annotation.Generated("com.microsoft.kiota")
2425
public class PeopleRequestBuilder extends BaseRequestBuilder {
26+
/**
27+
* Provides operations to manage the itemInsights property of the microsoft.graph.peopleAdminSettings entity.
28+
* @return a {@link ItemInsightsRequestBuilder}
29+
*/
30+
@jakarta.annotation.Nonnull
31+
public ItemInsightsRequestBuilder itemInsights() {
32+
return new ItemInsightsRequestBuilder(pathParameters, requestAdapter);
33+
}
2534
/**
2635
* Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity.
2736
* @return a {@link ProfileCardPropertiesRequestBuilder}
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
package com.microsoft.graph.admin.people.iteminsights;
2+
3+
import com.microsoft.graph.models.InsightsSettings;
4+
import com.microsoft.graph.models.odataerrors.ODataError;
5+
import com.microsoft.kiota.BaseRequestBuilder;
6+
import com.microsoft.kiota.BaseRequestConfiguration;
7+
import com.microsoft.kiota.HttpMethod;
8+
import com.microsoft.kiota.QueryParameters;
9+
import com.microsoft.kiota.RequestAdapter;
10+
import com.microsoft.kiota.RequestInformation;
11+
import com.microsoft.kiota.RequestOption;
12+
import com.microsoft.kiota.serialization.Parsable;
13+
import com.microsoft.kiota.serialization.ParsableFactory;
14+
import java.util.Collection;
15+
import java.util.HashMap;
16+
import java.util.Map;
17+
import java.util.Objects;
18+
/**
19+
* Provides operations to manage the itemInsights property of the microsoft.graph.peopleAdminSettings entity.
20+
*/
21+
@jakarta.annotation.Generated("com.microsoft.kiota")
22+
public class ItemInsightsRequestBuilder extends BaseRequestBuilder {
23+
/**
24+
* Instantiates a new {@link ItemInsightsRequestBuilder} and sets the default values.
25+
* @param pathParameters Path parameters for the request
26+
* @param requestAdapter The request adapter to use to execute the requests.
27+
*/
28+
public ItemInsightsRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
29+
super(requestAdapter, "{+baseurl}/admin/people/itemInsights{?%24expand,%24select}", pathParameters);
30+
}
31+
/**
32+
* Instantiates a new {@link ItemInsightsRequestBuilder} and sets the default values.
33+
* @param rawUrl The raw URL to use for the request builder.
34+
* @param requestAdapter The request adapter to use to execute the requests.
35+
*/
36+
public ItemInsightsRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
37+
super(requestAdapter, "{+baseurl}/admin/people/itemInsights{?%24expand,%24select}", rawUrl);
38+
}
39+
/**
40+
* Delete navigation property itemInsights for admin
41+
* @throws ODataError When receiving a 4XX or 5XX status code
42+
*/
43+
public void delete() {
44+
delete(null);
45+
}
46+
/**
47+
* Delete navigation property itemInsights for admin
48+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
49+
* @throws ODataError When receiving a 4XX or 5XX status code
50+
*/
51+
public void delete(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) {
52+
final RequestInformation requestInfo = toDeleteRequestInformation(requestConfiguration);
53+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
54+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
55+
this.requestAdapter.sendPrimitive(requestInfo, errorMapping, Void.class);
56+
}
57+
/**
58+
* Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph.
59+
* @return a {@link InsightsSettings}
60+
* @throws ODataError When receiving a 4XX or 5XX status code
61+
* @see <a href="https://learn.microsoft.com/graph/api/peopleadminsettings-list-iteminsights?view=graph-rest-1.0">Find more info here</a>
62+
*/
63+
@jakarta.annotation.Nullable
64+
public InsightsSettings get() {
65+
return get(null);
66+
}
67+
/**
68+
* Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph.
69+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
70+
* @return a {@link InsightsSettings}
71+
* @throws ODataError When receiving a 4XX or 5XX status code
72+
* @see <a href="https://learn.microsoft.com/graph/api/peopleadminsettings-list-iteminsights?view=graph-rest-1.0">Find more info here</a>
73+
*/
74+
@jakarta.annotation.Nullable
75+
public InsightsSettings get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
76+
final RequestInformation requestInfo = toGetRequestInformation(requestConfiguration);
77+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
78+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
79+
return this.requestAdapter.send(requestInfo, errorMapping, InsightsSettings::createFromDiscriminatorValue);
80+
}
81+
/**
82+
* Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings. To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph.
83+
* @param body The request body
84+
* @return a {@link InsightsSettings}
85+
* @throws ODataError When receiving a 4XX or 5XX status code
86+
* @see <a href="https://learn.microsoft.com/graph/api/insightssettings-update?view=graph-rest-1.0">Find more info here</a>
87+
*/
88+
@jakarta.annotation.Nullable
89+
public InsightsSettings patch(@jakarta.annotation.Nonnull final InsightsSettings body) {
90+
return patch(body, null);
91+
}
92+
/**
93+
* Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings. To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph.
94+
* @param body The request body
95+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
96+
* @return a {@link InsightsSettings}
97+
* @throws ODataError When receiving a 4XX or 5XX status code
98+
* @see <a href="https://learn.microsoft.com/graph/api/insightssettings-update?view=graph-rest-1.0">Find more info here</a>
99+
*/
100+
@jakarta.annotation.Nullable
101+
public InsightsSettings patch(@jakarta.annotation.Nonnull final InsightsSettings body, @jakarta.annotation.Nullable final java.util.function.Consumer<PatchRequestConfiguration> requestConfiguration) {
102+
Objects.requireNonNull(body);
103+
final RequestInformation requestInfo = toPatchRequestInformation(body, requestConfiguration);
104+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
105+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
106+
return this.requestAdapter.send(requestInfo, errorMapping, InsightsSettings::createFromDiscriminatorValue);
107+
}
108+
/**
109+
* Delete navigation property itemInsights for admin
110+
* @return a {@link RequestInformation}
111+
*/
112+
@jakarta.annotation.Nonnull
113+
public RequestInformation toDeleteRequestInformation() {
114+
return toDeleteRequestInformation(null);
115+
}
116+
/**
117+
* Delete navigation property itemInsights for admin
118+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
119+
* @return a {@link RequestInformation}
120+
*/
121+
@jakarta.annotation.Nonnull
122+
public RequestInformation toDeleteRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) {
123+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.DELETE, urlTemplate, pathParameters);
124+
requestInfo.configure(requestConfiguration, DeleteRequestConfiguration::new);
125+
requestInfo.headers.tryAdd("Accept", "application/json");
126+
return requestInfo;
127+
}
128+
/**
129+
* Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph.
130+
* @return a {@link RequestInformation}
131+
*/
132+
@jakarta.annotation.Nonnull
133+
public RequestInformation toGetRequestInformation() {
134+
return toGetRequestInformation(null);
135+
}
136+
/**
137+
* Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph.
138+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
139+
* @return a {@link RequestInformation}
140+
*/
141+
@jakarta.annotation.Nonnull
142+
public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
143+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.GET, urlTemplate, pathParameters);
144+
requestInfo.configure(requestConfiguration, GetRequestConfiguration::new, x -> x.queryParameters);
145+
requestInfo.headers.tryAdd("Accept", "application/json");
146+
return requestInfo;
147+
}
148+
/**
149+
* Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings. To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph.
150+
* @param body The request body
151+
* @return a {@link RequestInformation}
152+
*/
153+
@jakarta.annotation.Nonnull
154+
public RequestInformation toPatchRequestInformation(@jakarta.annotation.Nonnull final InsightsSettings body) {
155+
return toPatchRequestInformation(body, null);
156+
}
157+
/**
158+
* Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings. To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph.
159+
* @param body The request body
160+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
161+
* @return a {@link RequestInformation}
162+
*/
163+
@jakarta.annotation.Nonnull
164+
public RequestInformation toPatchRequestInformation(@jakarta.annotation.Nonnull final InsightsSettings body, @jakarta.annotation.Nullable final java.util.function.Consumer<PatchRequestConfiguration> requestConfiguration) {
165+
Objects.requireNonNull(body);
166+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.PATCH, urlTemplate, pathParameters);
167+
requestInfo.configure(requestConfiguration, PatchRequestConfiguration::new);
168+
requestInfo.headers.tryAdd("Accept", "application/json");
169+
requestInfo.setContentFromParsable(requestAdapter, "application/json", body);
170+
return requestInfo;
171+
}
172+
/**
173+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
174+
* @param rawUrl The raw URL to use for the request builder.
175+
* @return a {@link ItemInsightsRequestBuilder}
176+
*/
177+
@jakarta.annotation.Nonnull
178+
public ItemInsightsRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
179+
Objects.requireNonNull(rawUrl);
180+
return new ItemInsightsRequestBuilder(rawUrl, requestAdapter);
181+
}
182+
/**
183+
* Configuration for the request such as headers, query parameters, and middleware options.
184+
*/
185+
@jakarta.annotation.Generated("com.microsoft.kiota")
186+
public class DeleteRequestConfiguration extends BaseRequestConfiguration {
187+
}
188+
/**
189+
* Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph.
190+
*/
191+
@jakarta.annotation.Generated("com.microsoft.kiota")
192+
public class GetQueryParameters implements QueryParameters {
193+
/**
194+
* Expand related entities
195+
*/
196+
@jakarta.annotation.Nullable
197+
public String[] expand;
198+
/**
199+
* Select properties to be returned
200+
*/
201+
@jakarta.annotation.Nullable
202+
public String[] select;
203+
/**
204+
* Extracts the query parameters into a map for the URI template parsing.
205+
* @return a {@link Map<String, Object>}
206+
*/
207+
@jakarta.annotation.Nonnull
208+
public Map<String, Object> toQueryParameters() {
209+
final Map<String, Object> allQueryParams = new HashMap();
210+
allQueryParams.put("%24expand", expand);
211+
allQueryParams.put("%24select", select);
212+
return allQueryParams;
213+
}
214+
}
215+
/**
216+
* Configuration for the request such as headers, query parameters, and middleware options.
217+
*/
218+
@jakarta.annotation.Generated("com.microsoft.kiota")
219+
public class GetRequestConfiguration extends BaseRequestConfiguration {
220+
/**
221+
* Request query parameters
222+
*/
223+
@jakarta.annotation.Nullable
224+
public GetQueryParameters queryParameters = new GetQueryParameters();
225+
}
226+
/**
227+
* Configuration for the request such as headers, query parameters, and middleware options.
228+
*/
229+
@jakarta.annotation.Generated("com.microsoft.kiota")
230+
public class PatchRequestConfiguration extends BaseRequestConfiguration {
231+
}
232+
}

0 commit comments

Comments
 (0)