Class SpacesResource.MembersResource.CreateRequest
Creates a human membership or app membership for the calling app. Creating memberships for other apps
isn't supported. For an example, see Invite or add a user or a Google Chat app to a
space. When creating a membership, if the
specified member has their auto-accept policy turned off, then they're invited, and must accept the
space invitation before joining. Otherwise, creating a membership adds the member directly to the
specified space. Requires user
authentication. To
specify the member to add, set the membership.member.name
in the CreateMembershipRequest
: - To add
the calling app to a space or a direct message between two human users, use users/app
. Unable to add
other apps to the space. - To add a human user, use users/{user}
, where {user}
can be the email
address for the user. For users in the same Workspace organization {user}
can also be the id
for the
person from the People API, or the id
for the user in the Directory API. For example, if the People
API Person profile ID for user@example.com
is 123456789
, you can add the user to the space by
setting the membership.member.name
to users/user@example.com
or users/123456789
.
Inheritance
Inherited Members
Namespace: Google.Apis.HangoutsChat.v1
Assembly: Google.Apis.HangoutsChat.v1.dll
Syntax
public class SpacesResource.MembersResource.CreateRequest : HangoutsChatBaseServiceRequest<Membership>, IClientServiceRequest<Membership>, IClientServiceRequest
Constructors
CreateRequest(IClientService, Membership, string)
Constructs a new Create request.
Declaration
public CreateRequest(IClientService service, Membership body, string parent)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
Membership | body | |
string | parent |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Parent
Required. The resource name of the space for which to create the membership. Format: spaces/{space}
Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
Type | Description |
---|---|
string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()