Skip to content

Commit 576bb98

Browse files
feat: [google-apps-meet] Add ConnectActiveConference method to SpacesService (#13554)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 730566327 Source-Link: googleapis/googleapis@1674757 Source-Link: googleapis/googleapis-gen@ec2d7f0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwcHMtbWVldC8uT3dsQm90LnlhbWwiLCJoIjoiZWMyZDdmMGQxNzE0ZmJlNTEyMTJmNmIxMmFkZWM5MGY3OTcwNzA4MyJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent fdff960 commit 576bb98

22 files changed

+1910
-55
lines changed

packages/google-apps-meet/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ In order to use this library, you first need to go through the following steps:
2626
1. `Select or create a Cloud Platform project.`_
2727
2. `Enable billing for your project.`_
2828
3. `Enable the Google Meet API.`_
29-
4. `Setup Authentication.`_
29+
4. `Set up Authentication.`_
3030

3131
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
3232
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
3333
.. _Enable the Google Meet API.: https://developers.google.com/meet/api/guides/overview
34-
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
34+
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
3535

3636
Installation
3737
~~~~~~~~~~~~

packages/google-apps-meet/google/apps/meet/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.1.13" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-apps-meet/google/apps/meet_v2/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.1.13" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-apps-meet/google/apps/meet_v2beta/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
TranscriptEntry,
4242
)
4343
from .types.service import (
44+
ConnectActiveConferenceRequest,
45+
ConnectActiveConferenceResponse,
4446
CreateMemberRequest,
4547
CreateSpaceRequest,
4648
DeleteMemberRequest,
@@ -77,6 +79,8 @@
7779
"AnonymousUser",
7880
"ConferenceRecord",
7981
"ConferenceRecordsServiceClient",
82+
"ConnectActiveConferenceRequest",
83+
"ConnectActiveConferenceResponse",
8084
"CreateMemberRequest",
8185
"CreateSpaceRequest",
8286
"DeleteMemberRequest",

packages/google-apps-meet/google/apps/meet_v2beta/gapic_metadata.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@
209209
"grpc": {
210210
"libraryClient": "SpacesServiceClient",
211211
"rpcs": {
212+
"ConnectActiveConference": {
213+
"methods": [
214+
"connect_active_conference"
215+
]
216+
},
212217
"CreateMember": {
213218
"methods": [
214219
"create_member"
@@ -254,6 +259,11 @@
254259
"grpc-async": {
255260
"libraryClient": "SpacesServiceAsyncClient",
256261
"rpcs": {
262+
"ConnectActiveConference": {
263+
"methods": [
264+
"connect_active_conference"
265+
]
266+
},
257267
"CreateMember": {
258268
"methods": [
259269
"create_member"
@@ -299,6 +309,11 @@
299309
"rest": {
300310
"libraryClient": "SpacesServiceClient",
301311
"rpcs": {
312+
"ConnectActiveConference": {
313+
"methods": [
314+
"connect_active_conference"
315+
]
316+
},
302317
"CreateMember": {
303318
"methods": [
304319
"create_member"

packages/google-apps-meet/google/apps/meet_v2beta/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.1.13" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-apps-meet/google/apps/meet_v2beta/services/spaces_service/async_client.py

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,134 @@ async def sample_update_space():
654654
# Done; return the response.
655655
return response
656656

657+
async def connect_active_conference(
658+
self,
659+
request: Optional[Union[service.ConnectActiveConferenceRequest, dict]] = None,
660+
*,
661+
name: Optional[str] = None,
662+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
663+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
664+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
665+
) -> service.ConnectActiveConferenceResponse:
666+
r"""`Developer
667+
Preview <https://developers.google.com/workspace/preview>`__:
668+
Broker a WebRTC connection to the active conference of a space.
669+
670+
On success, clients must use the resulting SDP (Session
671+
Description Protocol) answer to establish a WebRTC connection.
672+
Once connected, additional functionality is available across
673+
WebRTC data channels.
674+
675+
See `Meet Media API
676+
overview <https://developers.google.com/meet/media-api/guides/overview>`__
677+
for more details about this connection.
678+
679+
.. code-block:: python
680+
681+
# This snippet has been automatically generated and should be regarded as a
682+
# code template only.
683+
# It will require modifications to work:
684+
# - It may require correct/in-range values for request initialization.
685+
# - It may require specifying regional endpoints when creating the service
686+
# client as shown in:
687+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
688+
from google.apps import meet_v2beta
689+
690+
async def sample_connect_active_conference():
691+
# Create a client
692+
client = meet_v2beta.SpacesServiceAsyncClient()
693+
694+
# Initialize request argument(s)
695+
request = meet_v2beta.ConnectActiveConferenceRequest(
696+
name="name_value",
697+
offer="offer_value",
698+
)
699+
700+
# Make the request
701+
response = await client.connect_active_conference(request=request)
702+
703+
# Handle the response
704+
print(response)
705+
706+
Args:
707+
request (Optional[Union[google.apps.meet_v2beta.types.ConnectActiveConferenceRequest, dict]]):
708+
The request object. Request to establish a WebRTC
709+
connection to the active conference of a
710+
space.
711+
name (:class:`str`):
712+
Required. Resource name of the space.
713+
Format: spaces/{spaceId}
714+
715+
This corresponds to the ``name`` field
716+
on the ``request`` instance; if ``request`` is provided, this
717+
should not be set.
718+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
719+
should be retried.
720+
timeout (float): The timeout for this request.
721+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
722+
sent along with the request as metadata. Normally, each value must be of type `str`,
723+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
724+
be of type `bytes`.
725+
726+
Returns:
727+
google.apps.meet_v2beta.types.ConnectActiveConferenceResponse:
728+
Response of ConnectActiveConference method.
729+
730+
A success response does not indicate the meeting is
731+
fully joined; further communication must occur across
732+
WebRTC.
733+
734+
See [Meet Media API
735+
overview](\ https://developers.google.com/meet/media-api/guides/overview)
736+
for more details about this connection.
737+
738+
"""
739+
# Create or coerce a protobuf request object.
740+
# - Quick check: If we got a request object, we should *not* have
741+
# gotten any keyword arguments that map to the request.
742+
has_flattened_params = any([name])
743+
if request is not None and has_flattened_params:
744+
raise ValueError(
745+
"If the `request` argument is set, then none of "
746+
"the individual field arguments should be set."
747+
)
748+
749+
# - Use the request object if provided (there's no risk of modifying the input as
750+
# there are no flattened fields), or create one.
751+
if not isinstance(request, service.ConnectActiveConferenceRequest):
752+
request = service.ConnectActiveConferenceRequest(request)
753+
754+
# If we have keyword arguments corresponding to fields on the
755+
# request, apply these.
756+
if name is not None:
757+
request.name = name
758+
759+
# Wrap the RPC method; this adds retry and timeout information,
760+
# and friendly error handling.
761+
rpc = self._client._transport._wrapped_methods[
762+
self._client._transport.connect_active_conference
763+
]
764+
765+
# Certain fields should be provided within the metadata header;
766+
# add these here.
767+
metadata = tuple(metadata) + (
768+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
769+
)
770+
771+
# Validate the universe domain.
772+
self._client._validate_universe_domain()
773+
774+
# Send the request.
775+
response = await rpc(
776+
request,
777+
retry=retry,
778+
timeout=timeout,
779+
metadata=metadata,
780+
)
781+
782+
# Done; return the response.
783+
return response
784+
657785
async def end_active_conference(
658786
self,
659787
request: Optional[Union[service.EndActiveConferenceRequest, dict]] = None,

packages/google-apps-meet/google/apps/meet_v2beta/services/spaces_service/client.py

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,133 @@ def sample_update_space():
10851085
# Done; return the response.
10861086
return response
10871087

1088+
def connect_active_conference(
1089+
self,
1090+
request: Optional[Union[service.ConnectActiveConferenceRequest, dict]] = None,
1091+
*,
1092+
name: Optional[str] = None,
1093+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1094+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1095+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1096+
) -> service.ConnectActiveConferenceResponse:
1097+
r"""`Developer
1098+
Preview <https://developers.google.com/workspace/preview>`__:
1099+
Broker a WebRTC connection to the active conference of a space.
1100+
1101+
On success, clients must use the resulting SDP (Session
1102+
Description Protocol) answer to establish a WebRTC connection.
1103+
Once connected, additional functionality is available across
1104+
WebRTC data channels.
1105+
1106+
See `Meet Media API
1107+
overview <https://developers.google.com/meet/media-api/guides/overview>`__
1108+
for more details about this connection.
1109+
1110+
.. code-block:: python
1111+
1112+
# This snippet has been automatically generated and should be regarded as a
1113+
# code template only.
1114+
# It will require modifications to work:
1115+
# - It may require correct/in-range values for request initialization.
1116+
# - It may require specifying regional endpoints when creating the service
1117+
# client as shown in:
1118+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
1119+
from google.apps import meet_v2beta
1120+
1121+
def sample_connect_active_conference():
1122+
# Create a client
1123+
client = meet_v2beta.SpacesServiceClient()
1124+
1125+
# Initialize request argument(s)
1126+
request = meet_v2beta.ConnectActiveConferenceRequest(
1127+
name="name_value",
1128+
offer="offer_value",
1129+
)
1130+
1131+
# Make the request
1132+
response = client.connect_active_conference(request=request)
1133+
1134+
# Handle the response
1135+
print(response)
1136+
1137+
Args:
1138+
request (Union[google.apps.meet_v2beta.types.ConnectActiveConferenceRequest, dict]):
1139+
The request object. Request to establish a WebRTC
1140+
connection to the active conference of a
1141+
space.
1142+
name (str):
1143+
Required. Resource name of the space.
1144+
Format: spaces/{spaceId}
1145+
1146+
This corresponds to the ``name`` field
1147+
on the ``request`` instance; if ``request`` is provided, this
1148+
should not be set.
1149+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
1150+
should be retried.
1151+
timeout (float): The timeout for this request.
1152+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1153+
sent along with the request as metadata. Normally, each value must be of type `str`,
1154+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
1155+
be of type `bytes`.
1156+
1157+
Returns:
1158+
google.apps.meet_v2beta.types.ConnectActiveConferenceResponse:
1159+
Response of ConnectActiveConference method.
1160+
1161+
A success response does not indicate the meeting is
1162+
fully joined; further communication must occur across
1163+
WebRTC.
1164+
1165+
See [Meet Media API
1166+
overview](\ https://developers.google.com/meet/media-api/guides/overview)
1167+
for more details about this connection.
1168+
1169+
"""
1170+
# Create or coerce a protobuf request object.
1171+
# - Quick check: If we got a request object, we should *not* have
1172+
# gotten any keyword arguments that map to the request.
1173+
has_flattened_params = any([name])
1174+
if request is not None and has_flattened_params:
1175+
raise ValueError(
1176+
"If the `request` argument is set, then none of "
1177+
"the individual field arguments should be set."
1178+
)
1179+
1180+
# - Use the request object if provided (there's no risk of modifying the input as
1181+
# there are no flattened fields), or create one.
1182+
if not isinstance(request, service.ConnectActiveConferenceRequest):
1183+
request = service.ConnectActiveConferenceRequest(request)
1184+
# If we have keyword arguments corresponding to fields on the
1185+
# request, apply these.
1186+
if name is not None:
1187+
request.name = name
1188+
1189+
# Wrap the RPC method; this adds retry and timeout information,
1190+
# and friendly error handling.
1191+
rpc = self._transport._wrapped_methods[
1192+
self._transport.connect_active_conference
1193+
]
1194+
1195+
# Certain fields should be provided within the metadata header;
1196+
# add these here.
1197+
metadata = tuple(metadata) + (
1198+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1199+
)
1200+
1201+
# Validate the universe domain.
1202+
self._validate_universe_domain()
1203+
1204+
# Send the request.
1205+
response = rpc(
1206+
request,
1207+
retry=retry,
1208+
timeout=timeout,
1209+
metadata=metadata,
1210+
)
1211+
1212+
# Done; return the response.
1213+
return response
1214+
10881215
def end_active_conference(
10891216
self,
10901217
request: Optional[Union[service.EndActiveConferenceRequest, dict]] = None,

packages/google-apps-meet/google/apps/meet_v2beta/services/spaces_service/transports/base.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class SpacesServiceTransport(abc.ABC):
3737
"""Abstract transport class for SpacesService."""
3838

3939
AUTH_SCOPES = (
40+
"https://www.googleapis.com/auth/meetings.conference.media.audio.readonly",
41+
"https://www.googleapis.com/auth/meetings.conference.media.readonly",
42+
"https://www.googleapis.com/auth/meetings.conference.media.video.readonly",
4043
"https://www.googleapis.com/auth/meetings.space.created",
4144
"https://www.googleapis.com/auth/meetings.space.readonly",
4245
"https://www.googleapis.com/auth/meetings.space.settings",
@@ -157,6 +160,11 @@ def _prep_wrapped_messages(self, client_info):
157160
default_timeout=60.0,
158161
client_info=client_info,
159162
),
163+
self.connect_active_conference: gapic_v1.method.wrap_method(
164+
self.connect_active_conference,
165+
default_timeout=None,
166+
client_info=client_info,
167+
),
160168
self.end_active_conference: gapic_v1.method.wrap_method(
161169
self.end_active_conference,
162170
default_timeout=60.0,
@@ -217,6 +225,18 @@ def update_space(
217225
]:
218226
raise NotImplementedError()
219227

228+
@property
229+
def connect_active_conference(
230+
self,
231+
) -> Callable[
232+
[service.ConnectActiveConferenceRequest],
233+
Union[
234+
service.ConnectActiveConferenceResponse,
235+
Awaitable[service.ConnectActiveConferenceResponse],
236+
],
237+
]:
238+
raise NotImplementedError()
239+
220240
@property
221241
def end_active_conference(
222242
self,

0 commit comments

Comments
 (0)