Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.microsoft.graph.chats.item.messages.MessagesRequestBuilder;
import com.microsoft.graph.chats.item.permissiongrants.PermissionGrantsRequestBuilder;
import com.microsoft.graph.chats.item.pinnedmessages.PinnedMessagesRequestBuilder;
import com.microsoft.graph.chats.item.removeallaccessforuser.RemoveAllAccessForUserRequestBuilder;
import com.microsoft.graph.chats.item.sendactivitynotification.SendActivityNotificationRequestBuilder;
import com.microsoft.graph.chats.item.tabs.TabsRequestBuilder;
import com.microsoft.graph.chats.item.unhideforuser.UnhideForUserRequestBuilder;
Expand Down Expand Up @@ -104,6 +105,14 @@ public PermissionGrantsRequestBuilder permissionGrants() {
public PinnedMessagesRequestBuilder pinnedMessages() {
return new PinnedMessagesRequestBuilder(pathParameters, requestAdapter);
}
/**
* Provides operations to call the removeAllAccessForUser method.
* @return a {@link RemoveAllAccessForUserRequestBuilder}
*/
@jakarta.annotation.Nonnull
public RemoveAllAccessForUserRequestBuilder removeAllAccessForUser() {
return new RemoveAllAccessForUserRequestBuilder(pathParameters, requestAdapter);
}
/**
* Provides operations to call the sendActivityNotification method.
* @return a {@link SendActivityNotificationRequestBuilder}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
package com.microsoft.graph.chats.item.removeallaccessforuser;

import com.microsoft.graph.models.TeamworkUserIdentity;
import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import com.microsoft.kiota.store.BackedModel;
import com.microsoft.kiota.store.BackingStore;
import com.microsoft.kiota.store.BackingStoreFactorySingleton;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class RemoveAllAccessForUserPostRequestBody implements AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores model information.
*/
@jakarta.annotation.Nonnull
protected BackingStore backingStore;
/**
* Instantiates a new {@link RemoveAllAccessForUserPostRequestBody} and sets the default values.
*/
public RemoveAllAccessForUserPostRequestBody() {
this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore();
this.setAdditionalData(new HashMap<>());
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link RemoveAllAccessForUserPostRequestBody}
*/
@jakarta.annotation.Nonnull
public static RemoveAllAccessForUserPostRequestBody createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new RemoveAllAccessForUserPostRequestBody();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
Map<String, Object> value = this.backingStore.get("additionalData");
if(value == null) {
value = new HashMap<>();
this.setAdditionalData(value);
}
return value;
}
/**
* Gets the backingStore property value. Stores model information.
* @return a {@link BackingStore}
*/
@jakarta.annotation.Nonnull
public BackingStore getBackingStore() {
return this.backingStore;
}
/**
* The deserialization information for the current model
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(1);
deserializerMap.put("user", (n) -> { this.setUser(n.getObjectValue(TeamworkUserIdentity::createFromDiscriminatorValue)); });
return deserializerMap;
}
/**
* Gets the user property value. The user property
* @return a {@link TeamworkUserIdentity}
*/
@jakarta.annotation.Nullable
public TeamworkUserIdentity getUser() {
return this.backingStore.get("user");
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeObjectValue("user", this.getUser());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
*/
public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) {
this.backingStore.set("additionalData", value);
}
/**
* Sets the backingStore property value. Stores model information.
* @param value Value to set for the backingStore property.
*/
public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) {
Objects.requireNonNull(value);
this.backingStore = value;
}
/**
* Sets the user property value. The user property
* @param value Value to set for the user property.
*/
public void setUser(@jakarta.annotation.Nullable final TeamworkUserIdentity value) {
this.backingStore.set("user", value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package com.microsoft.graph.chats.item.removeallaccessforuser;

import com.microsoft.graph.models.odataerrors.ODataError;
import com.microsoft.kiota.BaseRequestBuilder;
import com.microsoft.kiota.BaseRequestConfiguration;
import com.microsoft.kiota.HttpMethod;
import com.microsoft.kiota.RequestAdapter;
import com.microsoft.kiota.RequestInformation;
import com.microsoft.kiota.RequestOption;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParsableFactory;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Provides operations to call the removeAllAccessForUser method.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class RemoveAllAccessForUserRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new {@link RemoveAllAccessForUserRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
public RemoveAllAccessForUserRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/chats/{chat%2Did}/removeAllAccessForUser", pathParameters);
}
/**
* Instantiates a new {@link RemoveAllAccessForUserRequestBuilder} and sets the default values.
* @param rawUrl The raw URL to use for the request builder.
* @param requestAdapter The request adapter to use to execute the requests.
*/
public RemoveAllAccessForUserRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/chats/{chat%2Did}/removeAllAccessForUser", rawUrl);
}
/**
* Remove access to a chat for a user.
* @param body The request body
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/chat-removeallaccessforuser?view=graph-rest-1.0">Find more info here</a>
*/
public void post(@jakarta.annotation.Nonnull final RemoveAllAccessForUserPostRequestBody body) {
post(body, null);
}
/**
* Remove access to a chat for a user.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/chat-removeallaccessforuser?view=graph-rest-1.0">Find more info here</a>
*/
public void post(@jakarta.annotation.Nonnull final RemoveAllAccessForUserPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
Objects.requireNonNull(body);
final RequestInformation requestInfo = toPostRequestInformation(body, requestConfiguration);
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
errorMapping.put("XXX", ODataError::createFromDiscriminatorValue);
this.requestAdapter.sendPrimitive(requestInfo, errorMapping, Void.class);
}
/**
* Remove access to a chat for a user.
* @param body The request body
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final RemoveAllAccessForUserPostRequestBody body) {
return toPostRequestInformation(body, null);
}
/**
* Remove access to a chat for a user.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final RemoveAllAccessForUserPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
Objects.requireNonNull(body);
final RequestInformation requestInfo = new RequestInformation(HttpMethod.POST, urlTemplate, pathParameters);
requestInfo.configure(requestConfiguration, PostRequestConfiguration::new);
requestInfo.headers.tryAdd("Accept", "application/json");
requestInfo.setContentFromParsable(requestAdapter, "application/json", body);
return requestInfo;
}
/**
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
* @param rawUrl The raw URL to use for the request builder.
* @return a {@link RemoveAllAccessForUserRequestBuilder}
*/
@jakarta.annotation.Nonnull
public RemoveAllAccessForUserRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
Objects.requireNonNull(rawUrl);
return new RemoveAllAccessForUserRequestBuilder(rawUrl, requestAdapter);
}
/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class PostRequestConfiguration extends BaseRequestConfiguration {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,21 @@ public void delete(@jakarta.annotation.Nullable final java.util.function.Consume
this.requestAdapter.sendPrimitive(requestInfo, errorMapping, Void.class);
}
/**
* Information about retention label and settings enforced on the driveItem. Read-write.
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
* @return a {@link ItemRetentionLabel}
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/driveitem-getretentionlabel?view=graph-rest-1.0">Find more info here</a>
*/
@jakarta.annotation.Nullable
public ItemRetentionLabel get() {
return get(null);
}
/**
* Information about retention label and settings enforced on the driveItem. Read-write.
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link ItemRetentionLabel}
* @throws ODataError When receiving a 4XX or 5XX status code
* @see <a href="https://learn.microsoft.com/graph/api/driveitem-getretentionlabel?view=graph-rest-1.0">Find more info here</a>
*/
@jakarta.annotation.Nullable
public ItemRetentionLabel get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
Expand Down Expand Up @@ -126,15 +128,15 @@ public RequestInformation toDeleteRequestInformation(@jakarta.annotation.Nullabl
return requestInfo;
}
/**
* Information about retention label and settings enforced on the driveItem. Read-write.
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
return toGetRequestInformation(null);
}
/**
* Information about retention label and settings enforced on the driveItem. Read-write.
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RequestInformation}
*/
Expand Down Expand Up @@ -186,7 +188,7 @@ public RetentionLabelRequestBuilder withUrl(@jakarta.annotation.Nonnull final St
public class DeleteRequestConfiguration extends BaseRequestConfiguration {
}
/**
* Information about retention label and settings enforced on the driveItem. Read-write.
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator&apos;s perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class GetQueryParameters implements QueryParameters {
Expand Down
Loading
Loading