Mettez à jour les propriétés de l’objet place , qui peut être un room ou roomList. Vous pouvez identifier room ouroomList en spécifiant la propriété id ou emailAddress .
Dans le corps de la demande, fournissez les valeurs pour les champs appropriés qui doivent être mis à jour. Une seule instance d’une ressource de lieu (room ou roomList) peut être mise à jour à la fois. Dans le corps de la demande, utilisez @odata.type pour spécifier le type d’emplacement et inclure les propriétés de ce type à mettre à jour. Les propriétés existantes qui ne sont pas incluses dans le corps de la demande conservent leurs valeurs précédentes ou sont recalculées en fonction des modifications apportées à d’autres valeurs de propriété. Pour de meilleures performances, n’incluez pas de valeurs existantes qui n’ont pas été modifiées.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Room
{
OdataType = "microsoft.graph.room",
Nickname = "Conf Room",
Building = "1",
Label = "100",
Capacity = 50,
IsWheelChairAccessible = false,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Places["{place-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewPlace()
nickname := "Conf Room"
requestBody.SetNickname(&nickname)
building := "1"
requestBody.SetBuilding(&building)
label := "100"
requestBody.SetLabel(&label)
capacity := int32(50)
requestBody.SetCapacity(&capacity)
isWheelChairAccessible := false
requestBody.SetIsWheelChairAccessible(&isWheelChairAccessible)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
places, err := graphClient.Places().ByPlaceId("place-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Room place = new Room();
place.setOdataType("microsoft.graph.room");
place.setNickname("Conf Room");
place.setBuilding("1");
place.setLabel("100");
place.setCapacity(50);
place.setIsWheelChairAccessible(false);
Place result = graphClient.places().byPlaceId("{place-id}").patch(place);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.room import Room
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Room(
odata_type = "microsoft.graph.room",
nickname = "Conf Room",
building = "1",
label = "100",
capacity = 50,
is_wheel_chair_accessible = False,
)
result = await graph_client.places.by_place_id('place-id').patch(request_body)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new RoomList
{
OdataType = "microsoft.graph.roomList",
DisplayName = "Building 1",
Phone = "555-555-0100",
Address = new PhysicalAddress
{
Street = "4567 Main Street",
City = "Buffalo",
State = "NY",
PostalCode = "98052",
CountryOrRegion = "USA",
},
GeoCoordinates = new OutlookGeoCoordinates
{
Altitude = null,
Latitude = 47d,
Longitude = -122d,
Accuracy = null,
AltitudeAccuracy = null,
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Places["{place-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
RoomList place = new RoomList();
place.setOdataType("microsoft.graph.roomList");
place.setDisplayName("Building 1");
place.setPhone("555-555-0100");
PhysicalAddress address = new PhysicalAddress();
address.setStreet("4567 Main Street");
address.setCity("Buffalo");
address.setState("NY");
address.setPostalCode("98052");
address.setCountryOrRegion("USA");
place.setAddress(address);
OutlookGeoCoordinates geoCoordinates = new OutlookGeoCoordinates();
geoCoordinates.setAltitude(null);
geoCoordinates.setLatitude(47d);
geoCoordinates.setLongitude(-122d);
geoCoordinates.setAccuracy(null);
geoCoordinates.setAltitudeAccuracy(null);
place.setGeoCoordinates(geoCoordinates);
Place result = graphClient.places().byPlaceId("{place-id}").patch(place);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.room_list import RoomList
from msgraph.generated.models.physical_address import PhysicalAddress
from msgraph.generated.models.outlook_geo_coordinates import OutlookGeoCoordinates
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = RoomList(
odata_type = "microsoft.graph.roomList",
display_name = "Building 1",
phone = "555-555-0100",
address = PhysicalAddress(
street = "4567 Main Street",
city = "Buffalo",
state = "NY",
postal_code = "98052",
country_or_region = "USA",
),
geo_coordinates = OutlookGeoCoordinates(
altitude = None,
latitude = 47,
longitude = -122,
accuracy = None,
altitude_accuracy = None,
),
)
result = await graph_client.places.by_place_id('place-id').patch(request_body)