Class CreateMembershipRequest (0.12.0)

publicfinalclass CreateMembershipRequestextendsGeneratedMessageV3implementsCreateMembershipRequestOrBuilder

Request message for creating a membership.

Protobuf type google.chat.v1.CreateMembershipRequest

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

MEMBERSHIP_FIELD_NUMBER

publicstaticfinalintMEMBERSHIP_FIELD_NUMBER
Field Value
Type Description
int

PARENT_FIELD_NUMBER

publicstaticfinalintPARENT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticCreateMembershipRequestgetDefaultInstance()
Returns
Type Description
CreateMembershipRequest

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticCreateMembershipRequest.BuildernewBuilder()
Returns
Type Description
CreateMembershipRequest.Builder

newBuilder(CreateMembershipRequest prototype)

publicstaticCreateMembershipRequest.BuildernewBuilder(CreateMembershipRequestprototype)
Parameter
Name Description
prototype CreateMembershipRequest
Returns
Type Description
CreateMembershipRequest.Builder

parseDelimitedFrom(InputStream input)

publicstaticCreateMembershipRequestparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCreateMembershipRequestparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticCreateMembershipRequestparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticCreateMembershipRequestparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticCreateMembershipRequestparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticCreateMembershipRequestparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticCreateMembershipRequestparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCreateMembershipRequestparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticCreateMembershipRequestparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCreateMembershipRequestparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticCreateMembershipRequestparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticCreateMembershipRequestparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateMembershipRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<CreateMembershipRequest>parser()
Returns
Type Description
Parser<CreateMembershipRequest>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

publicCreateMembershipRequestgetDefaultInstanceForType()
Returns
Type Description
CreateMembershipRequest

getMembership()

publicMembershipgetMembership()

Required. The membership relation to create. The memberType field must contain a user with the user.name and user.type fields populated. The server will assign a resource name and overwrite anything specified. When a Chat app creates a membership relation for a human user, it must use the chat.memberships scope, set user.type to HUMAN, and set user.name with format 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 of 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. When a Chat app creates a membership relation for itself, it must use the chat.memberships.app scope, set user.type to BOT, and set user.name to users/app.

.google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Membership

The membership.

getMembershipOrBuilder()

publicMembershipOrBuildergetMembershipOrBuilder()

Required. The membership relation to create. The memberType field must contain a user with the user.name and user.type fields populated. The server will assign a resource name and overwrite anything specified. When a Chat app creates a membership relation for a human user, it must use the chat.memberships scope, set user.type to HUMAN, and set user.name with format 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 of 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. When a Chat app creates a membership relation for itself, it must use the chat.memberships.app scope, set user.type to BOT, and set user.name to users/app.

.google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
MembershipOrBuilder

getParent()

publicStringgetParent()

Required. The resource name of the space for which to create the membership.

Format: spaces/{space}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

publicByteStringgetParentBytes()

Required. The resource name of the space for which to create the membership.

Format: spaces/{space}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

getParserForType()

publicParser<CreateMembershipRequest>getParserForType()
Returns
Type Description
Parser<CreateMembershipRequest>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

hasMembership()

publicbooleanhasMembership()

Required. The membership relation to create. The memberType field must contain a user with the user.name and user.type fields populated. The server will assign a resource name and overwrite anything specified. When a Chat app creates a membership relation for a human user, it must use the chat.memberships scope, set user.type to HUMAN, and set user.name with format 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 of 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. When a Chat app creates a membership relation for itself, it must use the chat.memberships.app scope, set user.type to BOT, and set user.name to users/app.

.google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the membership field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicCreateMembershipRequest.BuildernewBuilderForType()
Returns
Type Description
CreateMembershipRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedCreateMembershipRequest.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CreateMembershipRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicCreateMembershipRequest.BuildertoBuilder()
Returns
Type Description
CreateMembershipRequest.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.