Skip to content

Commit 4d80774

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 213120
1 parent 5221c97 commit 4d80774

File tree

226 files changed

+16456
-473
lines changed

Some content is hidden

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

226 files changed

+16456
-473
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import com.microsoft.graph.admin.people.iteminsights.ItemInsightsRequestBuilder;
44
import com.microsoft.graph.admin.people.profilecardproperties.ProfileCardPropertiesRequestBuilder;
5+
import com.microsoft.graph.admin.people.profilesources.ProfileSourcesRequestBuilder;
6+
import com.microsoft.graph.admin.people.profilesourceswithsourceid.ProfileSourcesWithSourceIdRequestBuilder;
57
import com.microsoft.graph.admin.people.pronouns.PronounsRequestBuilder;
68
import com.microsoft.graph.models.odataerrors.ODataError;
79
import com.microsoft.graph.models.PeopleAdminSettings;
@@ -39,6 +41,14 @@ public ItemInsightsRequestBuilder itemInsights() {
3941
public ProfileCardPropertiesRequestBuilder profileCardProperties() {
4042
return new ProfileCardPropertiesRequestBuilder(pathParameters, requestAdapter);
4143
}
44+
/**
45+
* Provides operations to manage the profileSources property of the microsoft.graph.peopleAdminSettings entity.
46+
* @return a {@link ProfileSourcesRequestBuilder}
47+
*/
48+
@jakarta.annotation.Nonnull
49+
public ProfileSourcesRequestBuilder profileSources() {
50+
return new ProfileSourcesRequestBuilder(pathParameters, requestAdapter);
51+
}
4252
/**
4353
* Provides operations to manage the pronouns property of the microsoft.graph.peopleAdminSettings entity.
4454
* @return a {@link PronounsRequestBuilder}
@@ -87,6 +97,16 @@ public PeopleAdminSettings get(@jakarta.annotation.Nullable final java.util.func
8797
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
8898
return this.requestAdapter.send(requestInfo, errorMapping, PeopleAdminSettings::createFromDiscriminatorValue);
8999
}
100+
/**
101+
* Provides operations to manage the profileSources property of the microsoft.graph.peopleAdminSettings entity.
102+
* @param sourceId Alternate key of profileSource
103+
* @return a {@link ProfileSourcesWithSourceIdRequestBuilder}
104+
*/
105+
@jakarta.annotation.Nonnull
106+
public ProfileSourcesWithSourceIdRequestBuilder profileSourcesWithSourceId(@jakarta.annotation.Nonnull final String sourceId) {
107+
Objects.requireNonNull(sourceId);
108+
return new ProfileSourcesWithSourceIdRequestBuilder(pathParameters, requestAdapter, sourceId);
109+
}
90110
/**
91111
* Retrieve the properties and relationships of a peopleAdminSettings object.
92112
* @return a {@link RequestInformation}
Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
package com.microsoft.graph.admin.people.profilesources;
2+
3+
import com.microsoft.graph.admin.people.profilesources.count.CountRequestBuilder;
4+
import com.microsoft.graph.admin.people.profilesources.item.ProfileSourceItemRequestBuilder;
5+
import com.microsoft.graph.models.odataerrors.ODataError;
6+
import com.microsoft.graph.models.ProfileSource;
7+
import com.microsoft.graph.models.ProfileSourceCollectionResponse;
8+
import com.microsoft.kiota.BaseRequestBuilder;
9+
import com.microsoft.kiota.BaseRequestConfiguration;
10+
import com.microsoft.kiota.HttpMethod;
11+
import com.microsoft.kiota.QueryParameters;
12+
import com.microsoft.kiota.RequestAdapter;
13+
import com.microsoft.kiota.RequestInformation;
14+
import com.microsoft.kiota.RequestOption;
15+
import com.microsoft.kiota.serialization.Parsable;
16+
import com.microsoft.kiota.serialization.ParsableFactory;
17+
import java.util.Collection;
18+
import java.util.HashMap;
19+
import java.util.Map;
20+
import java.util.Objects;
21+
/**
22+
* Provides operations to manage the profileSources property of the microsoft.graph.peopleAdminSettings entity.
23+
*/
24+
@jakarta.annotation.Generated("com.microsoft.kiota")
25+
public class ProfileSourcesRequestBuilder extends BaseRequestBuilder {
26+
/**
27+
* Provides operations to count the resources in the collection.
28+
* @return a {@link CountRequestBuilder}
29+
*/
30+
@jakarta.annotation.Nonnull
31+
public CountRequestBuilder count() {
32+
return new CountRequestBuilder(pathParameters, requestAdapter);
33+
}
34+
/**
35+
* Provides operations to manage the profileSources property of the microsoft.graph.peopleAdminSettings entity.
36+
* @param profileSourceId The unique identifier of profileSource
37+
* @return a {@link ProfileSourceItemRequestBuilder}
38+
*/
39+
@jakarta.annotation.Nonnull
40+
public ProfileSourceItemRequestBuilder byProfileSourceId(@jakarta.annotation.Nonnull final String profileSourceId) {
41+
Objects.requireNonNull(profileSourceId);
42+
final HashMap<String, Object> urlTplParams = new HashMap<String, Object>(this.pathParameters);
43+
urlTplParams.put("profileSource%2Did", profileSourceId);
44+
return new ProfileSourceItemRequestBuilder(urlTplParams, requestAdapter);
45+
}
46+
/**
47+
* Instantiates a new {@link ProfileSourcesRequestBuilder} and sets the default values.
48+
* @param pathParameters Path parameters for the request
49+
* @param requestAdapter The request adapter to use to execute the requests.
50+
*/
51+
public ProfileSourcesRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
52+
super(requestAdapter, "{+baseurl}/admin/people/profileSources{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters);
53+
}
54+
/**
55+
* Instantiates a new {@link ProfileSourcesRequestBuilder} and sets the default values.
56+
* @param rawUrl The raw URL to use for the request builder.
57+
* @param requestAdapter The request adapter to use to execute the requests.
58+
*/
59+
public ProfileSourcesRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
60+
super(requestAdapter, "{+baseurl}/admin/people/profileSources{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl);
61+
}
62+
/**
63+
* Get a list of the profileSource objects and their properties, which represent both external data sources and out-of-the-box Microsoft data sources configured for user profiles in an organization.
64+
* @return a {@link ProfileSourceCollectionResponse}
65+
* @throws ODataError When receiving a 4XX or 5XX status code
66+
* @see <a href="https://learn.microsoft.com/graph/api/peopleadminsettings-list-profilesources?view=graph-rest-1.0">Find more info here</a>
67+
*/
68+
@jakarta.annotation.Nullable
69+
public ProfileSourceCollectionResponse get() {
70+
return get(null);
71+
}
72+
/**
73+
* Get a list of the profileSource objects and their properties, which represent both external data sources and out-of-the-box Microsoft data sources configured for user profiles in an organization.
74+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
75+
* @return a {@link ProfileSourceCollectionResponse}
76+
* @throws ODataError When receiving a 4XX or 5XX status code
77+
* @see <a href="https://learn.microsoft.com/graph/api/peopleadminsettings-list-profilesources?view=graph-rest-1.0">Find more info here</a>
78+
*/
79+
@jakarta.annotation.Nullable
80+
public ProfileSourceCollectionResponse get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
81+
final RequestInformation requestInfo = toGetRequestInformation(requestConfiguration);
82+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
83+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
84+
return this.requestAdapter.send(requestInfo, errorMapping, ProfileSourceCollectionResponse::createFromDiscriminatorValue);
85+
}
86+
/**
87+
* Create a new profileSource object.
88+
* @param body The request body
89+
* @return a {@link ProfileSource}
90+
* @throws ODataError When receiving a 4XX or 5XX status code
91+
* @see <a href="https://learn.microsoft.com/graph/api/peopleadminsettings-post-profilesources?view=graph-rest-1.0">Find more info here</a>
92+
*/
93+
@jakarta.annotation.Nullable
94+
public ProfileSource post(@jakarta.annotation.Nonnull final ProfileSource body) {
95+
return post(body, null);
96+
}
97+
/**
98+
* Create a new profileSource object.
99+
* @param body The request body
100+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
101+
* @return a {@link ProfileSource}
102+
* @throws ODataError When receiving a 4XX or 5XX status code
103+
* @see <a href="https://learn.microsoft.com/graph/api/peopleadminsettings-post-profilesources?view=graph-rest-1.0">Find more info here</a>
104+
*/
105+
@jakarta.annotation.Nullable
106+
public ProfileSource post(@jakarta.annotation.Nonnull final ProfileSource body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
107+
Objects.requireNonNull(body);
108+
final RequestInformation requestInfo = toPostRequestInformation(body, requestConfiguration);
109+
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
110+
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
111+
return this.requestAdapter.send(requestInfo, errorMapping, ProfileSource::createFromDiscriminatorValue);
112+
}
113+
/**
114+
* Get a list of the profileSource objects and their properties, which represent both external data sources and out-of-the-box Microsoft data sources configured for user profiles in an organization.
115+
* @return a {@link RequestInformation}
116+
*/
117+
@jakarta.annotation.Nonnull
118+
public RequestInformation toGetRequestInformation() {
119+
return toGetRequestInformation(null);
120+
}
121+
/**
122+
* Get a list of the profileSource objects and their properties, which represent both external data sources and out-of-the-box Microsoft data sources configured for user profiles in an organization.
123+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
124+
* @return a {@link RequestInformation}
125+
*/
126+
@jakarta.annotation.Nonnull
127+
public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
128+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.GET, urlTemplate, pathParameters);
129+
requestInfo.configure(requestConfiguration, GetRequestConfiguration::new, x -> x.queryParameters);
130+
requestInfo.headers.tryAdd("Accept", "application/json");
131+
return requestInfo;
132+
}
133+
/**
134+
* Create a new profileSource object.
135+
* @param body The request body
136+
* @return a {@link RequestInformation}
137+
*/
138+
@jakarta.annotation.Nonnull
139+
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final ProfileSource body) {
140+
return toPostRequestInformation(body, null);
141+
}
142+
/**
143+
* Create a new profileSource object.
144+
* @param body The request body
145+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
146+
* @return a {@link RequestInformation}
147+
*/
148+
@jakarta.annotation.Nonnull
149+
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final ProfileSource body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
150+
Objects.requireNonNull(body);
151+
final RequestInformation requestInfo = new RequestInformation(HttpMethod.POST, urlTemplate, pathParameters);
152+
requestInfo.configure(requestConfiguration, PostRequestConfiguration::new);
153+
requestInfo.headers.tryAdd("Accept", "application/json");
154+
requestInfo.setContentFromParsable(requestAdapter, "application/json", body);
155+
return requestInfo;
156+
}
157+
/**
158+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
159+
* @param rawUrl The raw URL to use for the request builder.
160+
* @return a {@link ProfileSourcesRequestBuilder}
161+
*/
162+
@jakarta.annotation.Nonnull
163+
public ProfileSourcesRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
164+
Objects.requireNonNull(rawUrl);
165+
return new ProfileSourcesRequestBuilder(rawUrl, requestAdapter);
166+
}
167+
/**
168+
* Get a list of the profileSource objects and their properties, which represent both external data sources and out-of-the-box Microsoft data sources configured for user profiles in an organization.
169+
*/
170+
@jakarta.annotation.Generated("com.microsoft.kiota")
171+
public class GetQueryParameters implements QueryParameters {
172+
/**
173+
* Include count of items
174+
*/
175+
@jakarta.annotation.Nullable
176+
public Boolean count;
177+
/**
178+
* Expand related entities
179+
*/
180+
@jakarta.annotation.Nullable
181+
public String[] expand;
182+
/**
183+
* Filter items by property values
184+
*/
185+
@jakarta.annotation.Nullable
186+
public String filter;
187+
/**
188+
* Order items by property values
189+
*/
190+
@jakarta.annotation.Nullable
191+
public String[] orderby;
192+
/**
193+
* Search items by search phrases
194+
*/
195+
@jakarta.annotation.Nullable
196+
public String search;
197+
/**
198+
* Select properties to be returned
199+
*/
200+
@jakarta.annotation.Nullable
201+
public String[] select;
202+
/**
203+
* Skip the first n items
204+
*/
205+
@jakarta.annotation.Nullable
206+
public Integer skip;
207+
/**
208+
* Show only the first n items
209+
*/
210+
@jakarta.annotation.Nullable
211+
public Integer top;
212+
/**
213+
* Extracts the query parameters into a map for the URI template parsing.
214+
* @return a {@link Map<String, Object>}
215+
*/
216+
@jakarta.annotation.Nonnull
217+
public Map<String, Object> toQueryParameters() {
218+
final Map<String, Object> allQueryParams = new HashMap();
219+
allQueryParams.put("%24count", count);
220+
allQueryParams.put("%24filter", filter);
221+
allQueryParams.put("%24search", search);
222+
allQueryParams.put("%24skip", skip);
223+
allQueryParams.put("%24top", top);
224+
allQueryParams.put("%24expand", expand);
225+
allQueryParams.put("%24orderby", orderby);
226+
allQueryParams.put("%24select", select);
227+
return allQueryParams;
228+
}
229+
}
230+
/**
231+
* Configuration for the request such as headers, query parameters, and middleware options.
232+
*/
233+
@jakarta.annotation.Generated("com.microsoft.kiota")
234+
public class GetRequestConfiguration extends BaseRequestConfiguration {
235+
/**
236+
* Request query parameters
237+
*/
238+
@jakarta.annotation.Nullable
239+
public GetQueryParameters queryParameters = new GetQueryParameters();
240+
}
241+
/**
242+
* Configuration for the request such as headers, query parameters, and middleware options.
243+
*/
244+
@jakarta.annotation.Generated("com.microsoft.kiota")
245+
public class PostRequestConfiguration extends BaseRequestConfiguration {
246+
}
247+
}

0 commit comments

Comments
 (0)