# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/apps/meet/v2/service_pb" module Google module Apps module Meet module V2 module ConferenceRecordsService module Rest ## # REST service stub for the ConferenceRecordsService service. # Service stub contains baseline method implementations # including transcoding, making the REST call, and deserialing the response. # class ServiceStub def initialize endpoint:, endpoint_template:, universe_domain:, credentials: # These require statements are intentionally placed here to initialize # the REST modules only when it's required. require "gapic/rest" @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, endpoint_template: endpoint_template, universe_domain: universe_domain, credentials: credentials, numeric_enums: true, raise_faraday_errors: false end ## # The effective universe domain # # @return [String] # def universe_domain @client_stub.universe_domain end ## # The effective endpoint # # @return [String] # def endpoint @client_stub.endpoint end ## # Baseline implementation for the get_conference_record REST call # # @param request_pb [::Google::Apps::Meet::V2::GetConferenceRecordRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::ConferenceRecord] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::ConferenceRecord] # A result object deserialized from the server's reply def get_conference_record request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_conference_record_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::ConferenceRecord.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_conference_records REST call # # @param request_pb [::Google::Apps::Meet::V2::ListConferenceRecordsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::ListConferenceRecordsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::ListConferenceRecordsResponse] # A result object deserialized from the server's reply def list_conference_records request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_conference_records_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::ListConferenceRecordsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_participant REST call # # @param request_pb [::Google::Apps::Meet::V2::GetParticipantRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::Participant] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::Participant] # A result object deserialized from the server's reply def get_participant request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_participant_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::Participant.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_participants REST call # # @param request_pb [::Google::Apps::Meet::V2::ListParticipantsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::ListParticipantsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::ListParticipantsResponse] # A result object deserialized from the server's reply def list_participants request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_participants_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::ListParticipantsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_participant_session REST call # # @param request_pb [::Google::Apps::Meet::V2::GetParticipantSessionRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::ParticipantSession] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::ParticipantSession] # A result object deserialized from the server's reply def get_participant_session request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_participant_session_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::ParticipantSession.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_participant_sessions REST call # # @param request_pb [::Google::Apps::Meet::V2::ListParticipantSessionsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::ListParticipantSessionsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::ListParticipantSessionsResponse] # A result object deserialized from the server's reply def list_participant_sessions request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_participant_sessions_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::ListParticipantSessionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_recording REST call # # @param request_pb [::Google::Apps::Meet::V2::GetRecordingRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::Recording] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::Recording] # A result object deserialized from the server's reply def get_recording request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_recording_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::Recording.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_recordings REST call # # @param request_pb [::Google::Apps::Meet::V2::ListRecordingsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::ListRecordingsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::ListRecordingsResponse] # A result object deserialized from the server's reply def list_recordings request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_recordings_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::ListRecordingsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_transcript REST call # # @param request_pb [::Google::Apps::Meet::V2::GetTranscriptRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::Transcript] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::Transcript] # A result object deserialized from the server's reply def get_transcript request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_transcript_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::Transcript.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_transcripts REST call # # @param request_pb [::Google::Apps::Meet::V2::ListTranscriptsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::ListTranscriptsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::ListTranscriptsResponse] # A result object deserialized from the server's reply def list_transcripts request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_transcripts_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::ListTranscriptsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_transcript_entry REST call # # @param request_pb [::Google::Apps::Meet::V2::GetTranscriptEntryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::TranscriptEntry] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::TranscriptEntry] # A result object deserialized from the server's reply def get_transcript_entry request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_transcript_entry_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::TranscriptEntry.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_transcript_entries REST call # # @param request_pb [::Google::Apps::Meet::V2::ListTranscriptEntriesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Apps::Meet::V2::ListTranscriptEntriesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2::ListTranscriptEntriesResponse] # A result object deserialized from the server's reply def list_transcript_entries request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_transcript_entries_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2::ListTranscriptEntriesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # @private # # GRPC transcoding helper method for the get_conference_record REST call # # @param request_pb [::Google::Apps::Meet::V2::GetConferenceRecordRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_conference_record_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^conferenceRecords/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_conference_records REST call # # @param request_pb [::Google::Apps::Meet::V2::ListConferenceRecordsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_conference_records_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/conferenceRecords", matches: [] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_participant REST call # # @param request_pb [::Google::Apps::Meet::V2::GetParticipantRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_participant_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^conferenceRecords/[^/]+/participants/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_participants REST call # # @param request_pb [::Google::Apps::Meet::V2::ListParticipantsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_participants_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/participants", matches: [ ["parent", %r{^conferenceRecords/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_participant_session REST call # # @param request_pb [::Google::Apps::Meet::V2::GetParticipantSessionRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_participant_session_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^conferenceRecords/[^/]+/participants/[^/]+/participantSessions/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_participant_sessions REST call # # @param request_pb [::Google::Apps::Meet::V2::ListParticipantSessionsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_participant_sessions_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/participantSessions", matches: [ ["parent", %r{^conferenceRecords/[^/]+/participants/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_recording REST call # # @param request_pb [::Google::Apps::Meet::V2::GetRecordingRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_recording_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^conferenceRecords/[^/]+/recordings/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_recordings REST call # # @param request_pb [::Google::Apps::Meet::V2::ListRecordingsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_recordings_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/recordings", matches: [ ["parent", %r{^conferenceRecords/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_transcript REST call # # @param request_pb [::Google::Apps::Meet::V2::GetTranscriptRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_transcript_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^conferenceRecords/[^/]+/transcripts/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_transcripts REST call # # @param request_pb [::Google::Apps::Meet::V2::ListTranscriptsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_transcripts_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/transcripts", matches: [ ["parent", %r{^conferenceRecords/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_transcript_entry REST call # # @param request_pb [::Google::Apps::Meet::V2::GetTranscriptEntryRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_transcript_entry_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^conferenceRecords/[^/]+/transcripts/[^/]+/entries/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_transcript_entries REST call # # @param request_pb [::Google::Apps::Meet::V2::ListTranscriptEntriesRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_transcript_entries_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/entries", matches: [ ["parent", %r{^conferenceRecords/[^/]+/transcripts/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end end end end end end end end