All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.symphony.api.pod.RoomMembershipApi Maven / Gradle / Ivy

There is a newer version: 8.0.5
Show newest version
package com.symphony.api.pod;

import com.symphony.api.model.Error;
import com.symphony.api.model.MembershipList;
import com.symphony.api.model.SuccessResponse;
import com.symphony.api.model.UserId;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * Pod API
 *
 * 

This document refers to Symphony API calls that do not need encryption or decryption of content. - sessionToken can be obtained by calling the authenticationAPI on the symphony back end and the key manager respectively. Refer to the methods described in authenticatorAPI.yaml. - Actions are defined to be atomic, ie will succeed in their entirety or fail and have changed nothing. - If it returns a 40X status then it will have made no change to the system even if ome subset of the request would have succeeded. - If this contract cannot be met for any reason then this is an error and the response code will be 50X. * */ @Path("/") public interface RoomMembershipApi { /** * Add a member to an existing room. * */ @POST @Path("/v1/admin/room/{id}/membership/add") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Add a member to an existing room.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SuccessResponse.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public SuccessResponse v1AdminRoomIdMembershipAddPost(UserId body, @HeaderParam("sessionToken") String sessionToken, @PathParam("id") String id); /** * Lists current and previous members of an existing room. * */ @GET @Path("/v1/admin/room/{id}/membership/list") @Produces({ "application/json" }) @Operation(summary = "Lists current and previous members of an existing room.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MembershipList.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public MembershipList v1AdminRoomIdMembershipListGet(@PathParam("id") String id, @HeaderParam("sessionToken") String sessionToken, @QueryParam("includePastMembers")Boolean includePastMembers); /** * Remove a member from a room. * */ @POST @Path("/v1/admin/room/{id}/membership/remove") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Remove a member from a room.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SuccessResponse.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public SuccessResponse v1AdminRoomIdMembershipRemovePost(UserId body, @HeaderParam("sessionToken") String sessionToken, @PathParam("id") String id); /** * Adds new member to an existing room. * */ @POST @Path("/v1/room/{id}/membership/add") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Adds new member to an existing room.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SuccessResponse.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public SuccessResponse v1RoomIdMembershipAddPost(UserId body, @HeaderParam("sessionToken") String sessionToken, @PathParam("id") String id); /** * Demotes room owner. * */ @POST @Path("/v1/room/{id}/membership/demoteOwner") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Demotes room owner.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SuccessResponse.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public SuccessResponse v1RoomIdMembershipDemoteOwnerPost(UserId body, @HeaderParam("sessionToken") String sessionToken, @PathParam("id") String id); /** * Lists the members of an existing room. * * Lists the members of an existing room. If the requesting user is an administrator, lists current and previous members. If the requesting user is a regular user, lists only current members. * */ @GET @Path("/v1/room/{id}/membership/list") @Produces({ "application/json" }) @Operation(summary = "Lists the members of an existing room.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MembershipList.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public MembershipList v1RoomIdMembershipListGet(@PathParam("id") String id, @HeaderParam("sessionToken") String sessionToken); /** * Promotes user to owner. * */ @POST @Path("/v1/room/{id}/membership/promoteOwner") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Promotes user to owner.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SuccessResponse.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public SuccessResponse v1RoomIdMembershipPromoteOwnerPost(UserId body, @HeaderParam("sessionToken") String sessionToken, @PathParam("id") String id); /** * Removes member from an existing room. * */ @POST @Path("/v1/room/{id}/membership/remove") @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "Removes member from an existing room.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SuccessResponse.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public SuccessResponse v1RoomIdMembershipRemovePost(UserId body, @HeaderParam("sessionToken") String sessionToken, @PathParam("id") String id); /** * Lists current members of an existing room. * */ @GET @Path("/v2/room/{id}/membership/list") @Produces({ "application/json" }) @Operation(summary = "Lists current members of an existing room.", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MembershipList.class))), @ApiResponse(responseCode = "400", description = "Client error.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "401", description = "Unauthorized: Session tokens invalid.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "403", description = "Forbidden: Caller lacks necessary entitlement.", content = @Content(schema = @Schema(implementation = Error.class))), @ApiResponse(responseCode = "500", description = "Server error, see response body for further details.", content = @Content(schema = @Schema(implementation = Error.class))) }) public MembershipList v2RoomIdMembershipListGet(@PathParam("id") String id, @HeaderParam("sessionToken") String sessionToken); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy