@BetaApi @Generated(value="by gapic-generator-java") public class SpacesServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
Space space = Space.newBuilder().build();
Space response = spacesServiceClient.createSpace(space);
}
Note: close() needs to be called on the SpacesServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
CreateSpace |
Creates a space. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSpace |
Gets details about a meeting space. For an example, see [Get a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#get-meeting-space). |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSpace |
Updates details about a meeting space. For an example, see [Update a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#update-meeting-space). |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
EndActiveConference |
Ends an active conference (if there's one). For an example, see [End active conference](https://developers.google.com/meet/api/guides/meeting-spaces#end-active-conference). |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateMember |
[Developer Preview](https://developers.google.com/workspace/preview): Create a member. This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user". |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetMember |
[Developer Preview](https://developers.google.com/workspace/preview): Get a member. This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user". |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMembers |
[Developer Preview](https://developers.google.com/workspace/preview): List members. This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted this API response will default to "name,email,role,user". |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMember |
[Developer Preview](https://developers.google.com/workspace/preview): Delete the member who was previously assigned roles in the space. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of SpacesServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SpacesServiceSettings spacesServiceSettings =
SpacesServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SpacesServiceClient spacesServiceClient = SpacesServiceClient.create(spacesServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SpacesServiceSettings spacesServiceSettings =
SpacesServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
SpacesServiceClient spacesServiceClient = SpacesServiceClient.create(spacesServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SpacesServiceSettings spacesServiceSettings =
SpacesServiceSettings.newHttpJsonBuilder().build();
SpacesServiceClient spacesServiceClient = SpacesServiceClient.create(spacesServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
SpacesServiceClient.ListMembersFixedSizeCollection |
static class |
SpacesServiceClient.ListMembersPage |
static class |
SpacesServiceClient.ListMembersPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
SpacesServiceClient(SpacesServiceSettings settings)
Constructs an instance of SpacesServiceClient, using the given settings.
|
protected |
SpacesServiceClient(SpacesServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static SpacesServiceClient |
create()
Constructs an instance of SpacesServiceClient with default settings.
|
static SpacesServiceClient |
create(SpacesServiceSettings settings)
Constructs an instance of SpacesServiceClient, using the given settings.
|
static SpacesServiceClient |
create(SpacesServiceStub stub)
Constructs an instance of SpacesServiceClient, using the given stub for making calls.
|
Member |
createMember(CreateMemberRequest request)
[Developer Preview](https://developers.google.com/workspace/preview): Create a member.
|
Member |
createMember(SpaceName parent,
Member member)
[Developer Preview](https://developers.google.com/workspace/preview): Create a member.
|
Member |
createMember(String parent,
Member member)
[Developer Preview](https://developers.google.com/workspace/preview): Create a member.
|
com.google.api.gax.rpc.UnaryCallable<CreateMemberRequest,Member> |
createMemberCallable()
[Developer Preview](https://developers.google.com/workspace/preview): Create a member.
|
Space |
createSpace(CreateSpaceRequest request)
Creates a space.
|
Space |
createSpace(Space space)
Creates a space.
|
com.google.api.gax.rpc.UnaryCallable<CreateSpaceRequest,Space> |
createSpaceCallable()
Creates a space.
|
void |
deleteMember(DeleteMemberRequest request)
[Developer Preview](https://developers.google.com/workspace/preview): Delete the member who was
previously assigned roles in the space.
|
void |
deleteMember(MemberName name)
[Developer Preview](https://developers.google.com/workspace/preview): Delete the member who was
previously assigned roles in the space.
|
void |
deleteMember(String name)
[Developer Preview](https://developers.google.com/workspace/preview): Delete the member who was
previously assigned roles in the space.
|
com.google.api.gax.rpc.UnaryCallable<DeleteMemberRequest,com.google.protobuf.Empty> |
deleteMemberCallable()
[Developer Preview](https://developers.google.com/workspace/preview): Delete the member who was
previously assigned roles in the space.
|
void |
endActiveConference(EndActiveConferenceRequest request)
Ends an active conference (if there's one).
|
void |
endActiveConference(SpaceName name)
Ends an active conference (if there's one).
|
void |
endActiveConference(String name)
Ends an active conference (if there's one).
|
com.google.api.gax.rpc.UnaryCallable<EndActiveConferenceRequest,com.google.protobuf.Empty> |
endActiveConferenceCallable()
Ends an active conference (if there's one).
|
Member |
getMember(GetMemberRequest request)
[Developer Preview](https://developers.google.com/workspace/preview): Get a member.
|
Member |
getMember(MemberName name)
[Developer Preview](https://developers.google.com/workspace/preview): Get a member.
|
Member |
getMember(String name)
[Developer Preview](https://developers.google.com/workspace/preview): Get a member.
|
com.google.api.gax.rpc.UnaryCallable<GetMemberRequest,Member> |
getMemberCallable()
[Developer Preview](https://developers.google.com/workspace/preview): Get a member.
|
SpacesServiceSettings |
getSettings() |
Space |
getSpace(GetSpaceRequest request)
Gets details about a meeting space.
|
Space |
getSpace(SpaceName name)
Gets details about a meeting space.
|
Space |
getSpace(String name)
Gets details about a meeting space.
|
com.google.api.gax.rpc.UnaryCallable<GetSpaceRequest,Space> |
getSpaceCallable()
Gets details about a meeting space.
|
SpacesServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
SpacesServiceClient.ListMembersPagedResponse |
listMembers(ListMembersRequest request)
[Developer Preview](https://developers.google.com/workspace/preview): List members.
|
SpacesServiceClient.ListMembersPagedResponse |
listMembers(SpaceName parent)
[Developer Preview](https://developers.google.com/workspace/preview): List members.
|
SpacesServiceClient.ListMembersPagedResponse |
listMembers(String parent)
[Developer Preview](https://developers.google.com/workspace/preview): List members.
|
com.google.api.gax.rpc.UnaryCallable<ListMembersRequest,ListMembersResponse> |
listMembersCallable()
[Developer Preview](https://developers.google.com/workspace/preview): List members.
|
com.google.api.gax.rpc.UnaryCallable<ListMembersRequest,SpacesServiceClient.ListMembersPagedResponse> |
listMembersPagedCallable()
[Developer Preview](https://developers.google.com/workspace/preview): List members.
|
void |
shutdown() |
void |
shutdownNow() |
Space |
updateSpace(Space space,
com.google.protobuf.FieldMask updateMask)
Updates details about a meeting space.
|
Space |
updateSpace(UpdateSpaceRequest request)
Updates details about a meeting space.
|
com.google.api.gax.rpc.UnaryCallable<UpdateSpaceRequest,Space> |
updateSpaceCallable()
Updates details about a meeting space.
|
protected SpacesServiceClient(SpacesServiceSettings settings) throws IOException
IOExceptionprotected SpacesServiceClient(SpacesServiceStub stub)
public static final SpacesServiceClient create() throws IOException
IOExceptionpublic static final SpacesServiceClient create(SpacesServiceSettings settings) throws IOException
IOExceptionpublic static final SpacesServiceClient create(SpacesServiceStub stub)
public final SpacesServiceSettings getSettings()
public SpacesServiceStub getStub()
public final Space createSpace(Space space)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
Space space = Space.newBuilder().build();
Space response = spacesServiceClient.createSpace(space);
}
space - Space to be created. As of May 2023, the input space can be empty. Later on the
input space can be non-empty when space configuration is introduced.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Space createSpace(CreateSpaceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
CreateSpaceRequest request =
CreateSpaceRequest.newBuilder().setSpace(Space.newBuilder().build()).build();
Space response = spacesServiceClient.createSpace(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateSpaceRequest,Space> createSpaceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
CreateSpaceRequest request =
CreateSpaceRequest.newBuilder().setSpace(Space.newBuilder().build()).build();
ApiFuture<Space> future = spacesServiceClient.createSpaceCallable().futureCall(request);
// Do something.
Space response = future.get();
}
public final Space getSpace(SpaceName name)
For an example, see [Get a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#get-meeting-space).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
SpaceName name = SpaceName.of("[SPACE]");
Space response = spacesServiceClient.getSpace(name);
}
name - Required. Resource name of the space.
Format: `spaces/{space}` or `spaces/{meetingCode}`.
`{space}` is the resource identifier for the space. It's a unique, server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`.
`{meetingCode}` is an alias for the space. It's a typeable, unique character string and is non-case sensitive. For example, `abc-mnop-xyz`. The maximum length is 128 characters.
A `meetingCode` shouldn't be stored long term as it can become dissociated from a meeting space and can be reused for different meeting spaces in the future. Generally, a `meetingCode` expires 365 days after last use. For more information, see [Learn about meeting codes in Google Meet](https://support.google.com/meet/answer/10710509).
For more information, see [How Meet identifies a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Space getSpace(String name)
For an example, see [Get a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#get-meeting-space).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
String name = SpaceName.of("[SPACE]").toString();
Space response = spacesServiceClient.getSpace(name);
}
name - Required. Resource name of the space.
Format: `spaces/{space}` or `spaces/{meetingCode}`.
`{space}` is the resource identifier for the space. It's a unique, server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`.
`{meetingCode}` is an alias for the space. It's a typeable, unique character string and is non-case sensitive. For example, `abc-mnop-xyz`. The maximum length is 128 characters.
A `meetingCode` shouldn't be stored long term as it can become dissociated from a meeting space and can be reused for different meeting spaces in the future. Generally, a `meetingCode` expires 365 days after last use. For more information, see [Learn about meeting codes in Google Meet](https://support.google.com/meet/answer/10710509).
For more information, see [How Meet identifies a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Space getSpace(GetSpaceRequest request)
For an example, see [Get a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#get-meeting-space).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
GetSpaceRequest request =
GetSpaceRequest.newBuilder().setName(SpaceName.of("[SPACE]").toString()).build();
Space response = spacesServiceClient.getSpace(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSpaceRequest,Space> getSpaceCallable()
For an example, see [Get a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#get-meeting-space).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
GetSpaceRequest request =
GetSpaceRequest.newBuilder().setName(SpaceName.of("[SPACE]").toString()).build();
ApiFuture<Space> future = spacesServiceClient.getSpaceCallable().futureCall(request);
// Do something.
Space response = future.get();
}
public final Space updateSpace(Space space, com.google.protobuf.FieldMask updateMask)
For an example, see [Update a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#update-meeting-space).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
Space space = Space.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Space response = spacesServiceClient.updateSpace(space, updateMask);
}
space - Required. Space to be updated.updateMask - Optional. Field mask used to specify the fields to be updated in the space.
If update_mask isn't provided(not set, set with empty paths, or only has "" as paths), it
defaults to update all fields provided with values in the request. Using "*" as
update_mask will update all fields, including deleting fields not set in the request.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Space updateSpace(UpdateSpaceRequest request)
For an example, see [Update a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#update-meeting-space).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
UpdateSpaceRequest request =
UpdateSpaceRequest.newBuilder()
.setSpace(Space.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Space response = spacesServiceClient.updateSpace(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateSpaceRequest,Space> updateSpaceCallable()
For an example, see [Update a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#update-meeting-space).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
UpdateSpaceRequest request =
UpdateSpaceRequest.newBuilder()
.setSpace(Space.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Space> future = spacesServiceClient.updateSpaceCallable().futureCall(request);
// Do something.
Space response = future.get();
}
public final void endActiveConference(SpaceName name)
For an example, see [End active conference](https://developers.google.com/meet/api/guides/meeting-spaces#end-active-conference).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
SpaceName name = SpaceName.of("[SPACE]");
spacesServiceClient.endActiveConference(name);
}
name - Required. Resource name of the space.
Format: `spaces/{space}`.
`{space}` is the resource identifier for the space. It's a unique, server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`.
For more information, see [How Meet identifies a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).
com.google.api.gax.rpc.ApiException - if the remote call failspublic final void endActiveConference(String name)
For an example, see [End active conference](https://developers.google.com/meet/api/guides/meeting-spaces#end-active-conference).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
String name = SpaceName.of("[SPACE]").toString();
spacesServiceClient.endActiveConference(name);
}
name - Required. Resource name of the space.
Format: `spaces/{space}`.
`{space}` is the resource identifier for the space. It's a unique, server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`.
For more information, see [How Meet identifies a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).
com.google.api.gax.rpc.ApiException - if the remote call failspublic final void endActiveConference(EndActiveConferenceRequest request)
For an example, see [End active conference](https://developers.google.com/meet/api/guides/meeting-spaces#end-active-conference).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
EndActiveConferenceRequest request =
EndActiveConferenceRequest.newBuilder()
.setName(SpaceName.of("[SPACE]").toString())
.build();
spacesServiceClient.endActiveConference(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<EndActiveConferenceRequest,com.google.protobuf.Empty> endActiveConferenceCallable()
For an example, see [End active conference](https://developers.google.com/meet/api/guides/meeting-spaces#end-active-conference).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
EndActiveConferenceRequest request =
EndActiveConferenceRequest.newBuilder()
.setName(SpaceName.of("[SPACE]").toString())
.build();
ApiFuture<Empty> future =
spacesServiceClient.endActiveConferenceCallable().futureCall(request);
// Do something.
future.get();
}
public final Member createMember(SpaceName parent, Member member)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
SpaceName parent = SpaceName.of("[SPACE]");
Member member = Member.newBuilder().build();
Member response = spacesServiceClient.createMember(parent, member);
}
parent - Required. Format: spaces/{space}member - Required. The member to be created.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Member createMember(String parent, Member member)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
String parent = SpaceName.of("[SPACE]").toString();
Member member = Member.newBuilder().build();
Member response = spacesServiceClient.createMember(parent, member);
}
parent - Required. Format: spaces/{space}member - Required. The member to be created.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Member createMember(CreateMemberRequest request)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
CreateMemberRequest request =
CreateMemberRequest.newBuilder()
.setParent(SpaceName.of("[SPACE]").toString())
.setMember(Member.newBuilder().build())
.build();
Member response = spacesServiceClient.createMember(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateMemberRequest,Member> createMemberCallable()
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
CreateMemberRequest request =
CreateMemberRequest.newBuilder()
.setParent(SpaceName.of("[SPACE]").toString())
.setMember(Member.newBuilder().build())
.build();
ApiFuture<Member> future = spacesServiceClient.createMemberCallable().futureCall(request);
// Do something.
Member response = future.get();
}
public final Member getMember(MemberName name)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
MemberName name = MemberName.of("[SPACE]", "[MEMBER]");
Member response = spacesServiceClient.getMember(name);
}
name - Required. Format: “spaces/{space}/members/{member}”com.google.api.gax.rpc.ApiException - if the remote call failspublic final Member getMember(String name)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
String name = MemberName.of("[SPACE]", "[MEMBER]").toString();
Member response = spacesServiceClient.getMember(name);
}
name - Required. Format: “spaces/{space}/members/{member}”com.google.api.gax.rpc.ApiException - if the remote call failspublic final Member getMember(GetMemberRequest request)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
GetMemberRequest request =
GetMemberRequest.newBuilder()
.setName(MemberName.of("[SPACE]", "[MEMBER]").toString())
.build();
Member response = spacesServiceClient.getMember(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetMemberRequest,Member> getMemberCallable()
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted, this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
GetMemberRequest request =
GetMemberRequest.newBuilder()
.setName(MemberName.of("[SPACE]", "[MEMBER]").toString())
.build();
ApiFuture<Member> future = spacesServiceClient.getMemberCallable().futureCall(request);
// Do something.
Member response = future.get();
}
public final SpacesServiceClient.ListMembersPagedResponse listMembers(SpaceName parent)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
SpaceName parent = SpaceName.of("[SPACE]");
for (Member element : spacesServiceClient.listMembers(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Format: spaces/{space}com.google.api.gax.rpc.ApiException - if the remote call failspublic final SpacesServiceClient.ListMembersPagedResponse listMembers(String parent)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
String parent = SpaceName.of("[SPACE]").toString();
for (Member element : spacesServiceClient.listMembers(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Format: spaces/{space}com.google.api.gax.rpc.ApiException - if the remote call failspublic final SpacesServiceClient.ListMembersPagedResponse listMembers(ListMembersRequest request)
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
ListMembersRequest request =
ListMembersRequest.newBuilder()
.setParent(SpaceName.of("[SPACE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Member element : spacesServiceClient.listMembers(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListMembersRequest,SpacesServiceClient.ListMembersPagedResponse> listMembersPagedCallable()
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
ListMembersRequest request =
ListMembersRequest.newBuilder()
.setParent(SpaceName.of("[SPACE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Member> future = spacesServiceClient.listMembersPagedCallable().futureCall(request);
// Do something.
for (Member element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListMembersRequest,ListMembersResponse> listMembersCallable()
This API supports the `fields` parameter in [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters). When the `fields` parameter is omitted this API response will default to "name,email,role,user".
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
ListMembersRequest request =
ListMembersRequest.newBuilder()
.setParent(SpaceName.of("[SPACE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListMembersResponse response = spacesServiceClient.listMembersCallable().call(request);
for (Member element : response.getMembersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final void deleteMember(MemberName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
MemberName name = MemberName.of("[SPACE]", "[MEMBER]");
spacesServiceClient.deleteMember(name);
}
name - Required. Format: “spaces/{space}/members/{member}”com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteMember(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
String name = MemberName.of("[SPACE]", "[MEMBER]").toString();
spacesServiceClient.deleteMember(name);
}
name - Required. Format: “spaces/{space}/members/{member}”com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteMember(DeleteMemberRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
DeleteMemberRequest request =
DeleteMemberRequest.newBuilder()
.setName(MemberName.of("[SPACE]", "[MEMBER]").toString())
.build();
spacesServiceClient.deleteMember(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteMemberRequest,com.google.protobuf.Empty> deleteMemberCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
DeleteMemberRequest request =
DeleteMemberRequest.newBuilder()
.setName(MemberName.of("[SPACE]", "[MEMBER]").toString())
.build();
ApiFuture<Empty> future = spacesServiceClient.deleteMemberCallable().futureCall(request);
// Do something.
future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2025 Google LLC. All rights reserved.