예제 #1
0
 /// <summary>Snippet for DeleteRecording</summary>
 public void DeleteRecording()
 {
     // Snippet: DeleteRecording(string, CallSettings)
     // Create client
     RecordingsClient recordingsClient = RecordingsClient.Create();
     // Initialize request argument(s)
     string name = "projects/[PROJECT]/calls/[CALL]/recordings/[RECORDING]";
     // Make the request
     Recording response = recordingsClient.DeleteRecording(name);
     // End snippet
 }
예제 #2
0
 /// <summary>Snippet for DeleteRecording</summary>
 public void DeleteRecordingRequestObject()
 {
     // Snippet: DeleteRecording(DeleteRecordingRequest, CallSettings)
     // Create client
     RecordingsClient recordingsClient = RecordingsClient.Create();
     // Initialize request argument(s)
     DeleteRecordingRequest request = new DeleteRecordingRequest
     {
         RecordingName = RecordingName.FromProjectCallRecording("[PROJECT]", "[CALL]", "[RECORDING]"),
     };
     // Make the request
     Recording response = recordingsClient.DeleteRecording(request);
     // End snippet
 }
예제 #3
0
 /// <summary>Snippet for GetRecording</summary>
 public void GetRecordingRequestObject()
 {
     // Snippet: GetRecording(GetRecordingRequest, CallSettings)
     // Create client
     RecordingsClient recordingsClient = RecordingsClient.Create();
     // Initialize request argument(s)
     GetRecordingRequest request = new GetRecordingRequest
     {
         RecordingName = RecordingName.FromProjectCallRecording("[PROJECT]", "[CALL]", "[RECORDING]"),
         View          = RecordingView.Unspecified,
     };
     // Make the request
     Recording response = recordingsClient.GetRecording(request);
     // End snippet
 }
예제 #4
0
        /// <summary>Snippet for ListRecordings</summary>
        public void ListRecordingsRequestObject()
        {
            // Snippet: ListRecordings(ListRecordingsRequest, CallSettings)
            // Create client
            RecordingsClient recordingsClient = RecordingsClient.Create();
            // Initialize request argument(s)
            ListRecordingsRequest request = new ListRecordingsRequest
            {
                ParentAsCallName = CallName.FromProjectCall("[PROJECT]", "[CALL]"),
                View             = RecordingView.Unspecified,
            };
            // Make the request
            PagedEnumerable <ListRecordingsResponse, Recording> response = recordingsClient.ListRecordings(request);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (Recording item in response)
            {
                // Do something with each item
                Console.WriteLine(item);
            }

            // Or iterate over pages (of server-defined size), performing one RPC per page
            foreach (ListRecordingsResponse page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Recording item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            }

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int pageSize = 10;
            Page <Recording> singlePage = response.ReadPage(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Recording item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
            // End snippet
        }