# frozen_string_literal: true # Copyright 2023 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/v2beta/service_pb" module Google module Apps module Meet module V2beta 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 # @private def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: # 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, service_name: self.class, raise_faraday_errors: false, logger: logger 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 ## # The logger used for request/response debug logging. # # @return [Logger] # def logger stub: false stub ? @client_stub.stub_logger : @client_stub.logger end ## # Baseline implementation for the get_conference_record REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::ConferenceRecord] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "get_conference_record", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::ConferenceRecord.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_conference_records REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::ListConferenceRecordsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "list_conference_records", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::ListConferenceRecordsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_participant REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::Participant] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "get_participant", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::Participant.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_participants REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::ListParticipantsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "list_participants", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::ListParticipantsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_participant_session REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::ParticipantSession] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "get_participant_session", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::ParticipantSession.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_participant_sessions REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::ListParticipantSessionsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "list_participant_sessions", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::ListParticipantSessionsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_recording REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::Recording] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "get_recording", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::Recording.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_recordings REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::ListRecordingsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "list_recordings", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::ListRecordingsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_transcript REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::Transcript] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "get_transcript", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::Transcript.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_transcripts REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::ListTranscriptsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "list_transcripts", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::ListTranscriptsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_transcript_entry REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::TranscriptEntry] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "get_transcript_entry", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::TranscriptEntry.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_transcript_entries REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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::V2beta::ListTranscriptEntriesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Apps::Meet::V2beta::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, method_name: "list_transcript_entries", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Apps::Meet::V2beta::ListTranscriptEntriesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # @private # # GRPC transcoding helper method for the get_conference_record REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/conferenceRecords", matches: [] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_participant REST call # # @param request_pb [::Google::Apps::Meet::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{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::V2beta::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: "/v2beta/{parent}/entries", matches: [ ["parent", %r{^conferenceRecords/[^/]+/transcripts/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end end end end end end end end