라이브 세션 검사

Video Stitcher API는 라이브 세션 요청 본문의 광고 태그에 지정된 광고 제공업체에 요청을 보냅니다. 이러한 요청의 요청 및 응답 메타데이터는 14일 동안 저장되며 라이브 세션을 검사하여 확인할 수 있습니다.

Video Stitcher API는 다음을 사용하여 광고 태그 세부정보를 구성합니다.

  • 지정된 광고 시점의 요청된 광고 태그 URL(또는 아무 것도 지정되지 않은 경우 기본 광고 태그)
  • 라이브 세션 요청의 구성된 광고 태그 매크로
  • 추가 사용자 메타데이터

이 정보는 응답의 본문 및 메타데이터와 함께 Video Stitcher API의 동작에 대한 통계를 제공합니다.

이 페이지에서는 특정 라이브 세션에 대한 라이브 세션 및 광고 태그 세부정보를 검사하는 방법을 설명합니다. 자세한 내용은 REST 문서를 참조하세요. 이 페이지는 Google Ad Manager(GAM) 광고 삽입을 위해 만든 라이브 세션에는 적용되지 않습니다. 이러한 세션에는 광고 태그 및 병합 세부정보 엔드포인트를 사용할 수 없습니다. Ad Manager의 라이브 스트림 활동 모니터링 도구를 사용하여 광고 요청에 대한 세부정보를 확인하세요.

시작하기 전에

Video Stitcher API로 라이브 세션을 만드는 단계를 숙지해야 합니다. 자세한 내용은 안내 가이드를 참조하세요.

광고 태그 세부정보 나열

실시간 세션의 광고 태그 세부정보를 나열하려면 projects.locations.liveSessions.liveAdTagDetails.list 메서드를 사용합니다.

이전에 만든 라이브 세션에 대해 다음 응답을 고려합니다(일부 필드는 생략됨).

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION/liveSessions/SESSION_ID",
  ...
}

REST

요청 데이터를 사용하기 전에 다음을 바꿉니다.

  • PROJECT_NUMBER: IAM 설정 페이지에서 프로젝트 번호 필드에 있는 Google Cloud 프로젝트 번호입니다.
  • LOCATION: 세션의 위치입니다. 지원되는 리전 중 하나를 사용합니다.
    위치 표시
    • us-central1
    • us-east1
    • us-west1
    • asia-east1
    • asia-south1
    • asia-southeast1
    • europe-west1
    • southamerica-east1
  • SESSION_ID: 라이브 세션의 식별자입니다.

요청을 보내려면 다음 옵션 중 하나를 펼칩니다.

다음과 비슷한 JSON 응답이 표시됩니다.

{
  "liveAdTagDetails" : [
    {
      "name": "projects/PROJECT_NUMBER/locations/LOCATION/liveSessions/SESSION_ID/liveAdTagDetails/LIVE_AD_TAG_DETAILS_ID",
      "adRequests": [
        {
          "uri": "REQUEST_URL",
          "requestMetadata": "AD_TAG_REQUEST_METADATA",
          "responseMetadata": "AD_TAG_RESPONSE_METADATA"
        }
      ]
    }
  ]
}

반환된 LIVE_AD_TAG_DETAILS_ID를 복사합니다. 단일 광고 태그의 세부정보를 가져오는 데 필요합니다.

C#

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용C# 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API C# API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


using Google.Api.Gax;
using Google.Cloud.Video.Stitcher.V1;

public class ListLiveAdTagDetailsSample
{
    public PagedEnumerable<ListLiveAdTagDetailsResponse, LiveAdTagDetail> ListLiveAdTagDetails(
        string projectId, string regionId, string sessionId)
    {
        // Create the client.
        VideoStitcherServiceClient client = VideoStitcherServiceClient.Create();

        ListLiveAdTagDetailsRequest request = new ListLiveAdTagDetailsRequest
        {
            ParentAsLiveSessionName = LiveSessionName.FromProjectLocationLiveSession(projectId, regionId, sessionId)
        };

        // Make the request.
        PagedEnumerable<ListLiveAdTagDetailsResponse, LiveAdTagDetail> response = client.ListLiveAdTagDetails(request);

        // Return the result.
        return response;
    }
}

Go

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Go 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Go API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

import (
	"context"
	"fmt"
	"io"

	stitcher "cloud.google.com/go/video/stitcher/apiv1"
	stitcherstreampb "cloud.google.com/go/video/stitcher/apiv1/stitcherpb"
	"google.golang.org/api/iterator"
)

// listLiveAdTagDetails lists the ad tag details for the specified live session.
func listLiveAdTagDetails(w io.Writer, projectID, sessionID string) error {
	// projectID := "my-project-id"
	// sessionID := "my-session-id"
	location := "us-central1"
	ctx := context.Background()
	client, err := stitcher.NewVideoStitcherClient(ctx)
	if err != nil {
		return fmt.Errorf("stitcher.NewVideoStitcherClient: %w", err)
	}
	defer client.Close()

	req := &stitcherstreampb.ListLiveAdTagDetailsRequest{
		Parent: fmt.Sprintf("projects/%s/locations/%s/liveSessions/%s", projectID, location, sessionID),
	}

	it := client.ListLiveAdTagDetails(ctx, req)
	fmt.Fprintln(w, "Live ad tag details:")
	for {
		response, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			return fmt.Errorf("it.Next(): %w", err)
		}
		fmt.Fprintln(w, response.GetName())
	}
	return nil
}

Java

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Java 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Java API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


import com.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest;
import com.google.cloud.video.stitcher.v1.LiveAdTagDetail;
import com.google.cloud.video.stitcher.v1.LiveSessionName;
import com.google.cloud.video.stitcher.v1.VideoStitcherServiceClient;
import java.io.IOException;

public class ListLiveAdTagDetails {

  public static void main(String[] args) throws Exception {
    // TODO(developer): Replace these variables before running the sample.
    String projectId = "my-project-id";
    String location = "us-central1";
    String sessionId = "my-session-id";

    listLiveAdTagDetails(projectId, location, sessionId);
  }

  public static void listLiveAdTagDetails(String projectId, String location, String sessionId)
      throws IOException {
    // Initialize client that will be used to send requests. This client only needs to be created
    // once, and can be reused for multiple requests. In this example, try-with-resources is used
    // which automatically calls close() on the client to clean up resources.
    try (VideoStitcherServiceClient videoStitcherServiceClient =
        VideoStitcherServiceClient.create()) {
      ListLiveAdTagDetailsRequest listLiveAdTagDetailsRequest =
          ListLiveAdTagDetailsRequest.newBuilder()
              .setParent(LiveSessionName.of(projectId, location, sessionId).toString())
              .build();

      VideoStitcherServiceClient.ListLiveAdTagDetailsPagedResponse response =
          videoStitcherServiceClient.listLiveAdTagDetails(listLiveAdTagDetailsRequest);
      System.out.println("Live ad tag details:");

      for (LiveAdTagDetail adTagDetail : response.iterateAll()) {
        System.out.println(adTagDetail.toString());
      }
    }
  }
}

Node.js

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Node.js 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Node.js API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

/**
 * TODO(developer): Uncomment these variables before running the sample.
 */
// projectId = 'my-project-id';
// location = 'us-central1';
// sessionId = 'my-session-id';

// Imports the Video Stitcher library
const {VideoStitcherServiceClient} =
  require('@google-cloud/video-stitcher').v1;
// Instantiates a client
const stitcherClient = new VideoStitcherServiceClient();

async function listLiveAdTagDetails() {
  // Construct request
  const request = {
    parent: stitcherClient.liveSessionPath(projectId, location, sessionId),
  };
  const iterable = await stitcherClient.listLiveAdTagDetailsAsync(request);
  console.log('Live ad tag details:');
  for await (const response of iterable) {
    console.log(response.name);
  }
}

listLiveAdTagDetails();

PHP

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용PHP 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API PHP API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

use Google\Cloud\Video\Stitcher\V1\Client\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest;

/**
 * Lists the ad tag details for the specified live session.
 *
 * @param string $callingProjectId     The project ID to run the API call under
 * @param string $location             The location of the session
 * @param string $sessionId            The ID of the session
 */
function list_live_ad_tag_details(
    string $callingProjectId,
    string $location,
    string $sessionId
): void {
    // Instantiate a client.
    $stitcherClient = new VideoStitcherServiceClient();

    $formattedName = $stitcherClient->liveSessionName($callingProjectId, $location, $sessionId);
    $request = (new ListLiveAdTagDetailsRequest())
        ->setParent($formattedName);
    $response = $stitcherClient->listLiveAdTagDetails($request);

    // Print the ad tag details list.
    $adTagDetails = $response->iterateAllElements();
    print('Live ad tag details:' . PHP_EOL);
    foreach ($adTagDetails as $adTagDetail) {
        printf('%s' . PHP_EOL, $adTagDetail->getName());
    }
}

Python

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Python 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Python API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


import argparse

from google.cloud.video.stitcher_v1.services.video_stitcher_service import (
    pagers,
    VideoStitcherServiceClient,
)

def list_live_ad_tag_details(
    project_id: str, location: str, session_id: str
) -> pagers.ListLiveAdTagDetailsPager:
    """Lists the ad tag details for the specified live session.
    Args:
        project_id: The GCP project ID.
        location: The location of the session.
        session_id: The ID of the live session.

    Returns:
        An iterable object containing live ad tag details resources.
    """

    client = VideoStitcherServiceClient()

    parent = client.live_session_path(project_id, location, session_id)
    page_result = client.list_live_ad_tag_details(parent=parent)
    print("Live ad tag details:")
    for response in page_result:
        print(response)

    return page_result

Ruby

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Ruby 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Ruby API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

require "google/cloud/video/stitcher"

##
# List the ad tag details for a live session
#
# @param project_id [String] Your Google Cloud project (e.g. "my-project")
# @param location [String] The location (e.g. "us-central1")
# @param session_id [String] The live session ID (e.g. "my-live-session-id")
#
def list_live_ad_tag_details project_id:, location:, session_id:
  # Create a Video Stitcher client.
  client = Google::Cloud::Video::Stitcher.video_stitcher_service

  # Build the resource name of the parent.
  parent = client.live_session_path project: project_id, location: location,
                                    live_session: session_id

  # List all ad tag details for the live session.
  response = client.list_live_ad_tag_details parent: parent

  puts "Live ad tag details:"
  # Print out all live ad tag details.
  response.each do |live_ad_tag_detail|
    puts live_ad_tag_detail.name
  end
end

광고 태그 세부정보 가져오기

라이브 세션에서 단일 광고 태그 세부정보를 가져오려면 projects.locations.liveSessions.liveAdTagDetails.get 메서드를 사용합니다.

다음 예시에서는 이전 요청에서 반환된 광고 태그 세부정보의 이름을 사용하여 라이브 세션의 단일 광고 태그 세부정보를 확인하는 방법을 보여줍니다.

REST

요청 데이터를 사용하기 전에 다음을 바꿉니다.

  • PROJECT_NUMBER: IAM 설정 페이지에서 프로젝트 번호 필드에 있는 Google Cloud 프로젝트 번호입니다.
  • LOCATION: 세션의 위치입니다. 지원되는 리전 중 하나를 사용합니다.
    위치 표시
    • us-central1
    • us-east1
    • us-west1
    • asia-east1
    • asia-south1
    • asia-southeast1
    • europe-west1
    • southamerica-east1
  • SESSION_ID: 라이브 세션의 식별자입니다.
  • LIVE_AD_TAG_DETAILS_ID: 실시간 광고 태그 세부정보의 ID입니다.

요청을 보내려면 다음 옵션 중 하나를 펼칩니다.

다음과 비슷한 JSON 응답이 표시됩니다.

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION/liveSessions/SESSION_ID/liveAdTagDetails/LIVE_AD_TAG_DETAILS_ID",
  "adRequests": [
    {
      "uri": "REQUEST_URL",
      "requestMetadata": "AD_TAG_REQUEST_METADATA",
      "responseMetadata": "AD_TAG_RESPONSE_METADATA"
    }
  ]
}

C#

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용C# 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API C# API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


using Google.Cloud.Video.Stitcher.V1;

public class GetLiveAdTagDetailSample
{
    public LiveAdTagDetail GetLiveAdTagDetail(
        string projectId, string location, string sessionId, string adTagDetailId)
    {
        // Create the client.
        VideoStitcherServiceClient client = VideoStitcherServiceClient.Create();

        GetLiveAdTagDetailRequest request = new GetLiveAdTagDetailRequest
        {
            LiveAdTagDetailName = LiveAdTagDetailName.FromProjectLocationLiveSessionLiveAdTagDetail(projectId, location, sessionId, adTagDetailId)
        };

        // Call the API.
        LiveAdTagDetail liveAdTagDetail = client.GetLiveAdTagDetail(request);

        // Return the result.
        return liveAdTagDetail;
    }
}

Go

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Go 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Go API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

import (
	"context"
	"encoding/json"
	"fmt"
	"io"

	stitcher "cloud.google.com/go/video/stitcher/apiv1"
	stitcherstreampb "cloud.google.com/go/video/stitcher/apiv1/stitcherpb"
)

// getLiveAdTagDetail gets the specified ad tag detail for a live session.
func getLiveAdTagDetail(w io.Writer, projectID, sessionID, adTagDetailID string) error {
	// projectID := "my-project-id"
	// sessionID := "my-session-id"
	// adTagDetailID := "my-ad-tag-detail-id"
	location := "us-central1"
	ctx := context.Background()
	client, err := stitcher.NewVideoStitcherClient(ctx)
	if err != nil {
		return fmt.Errorf("stitcher.NewVideoStitcherClient: %w", err)
	}
	defer client.Close()

	req := &stitcherstreampb.GetLiveAdTagDetailRequest{
		Name: fmt.Sprintf("projects/%s/locations/%s/liveSessions/%s/liveAdTagDetails/%s", projectID, location, sessionID, adTagDetailID),
	}
	// Gets the ad tag detail.
	response, err := client.GetLiveAdTagDetail(ctx, req)
	if err != nil {
		return fmt.Errorf("client.GetLiveAdTagDetail: %w", err)
	}
	b, err := json.MarshalIndent(response, "", " ")
	if err != nil {
		return fmt.Errorf("json.MarshalIndent: %w", err)
	}
	fmt.Fprintf(w, "Live ad tag detail:\n%v", string(b))
	return nil
}

Java

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Java 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Java API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


import com.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest;
import com.google.cloud.video.stitcher.v1.LiveAdTagDetail;
import com.google.cloud.video.stitcher.v1.LiveAdTagDetailName;
import com.google.cloud.video.stitcher.v1.VideoStitcherServiceClient;
import java.io.IOException;

public class GetLiveAdTagDetail {

  public static void main(String[] args) throws Exception {
    // TODO(developer): Replace these variables before running the sample.
    String projectId = "my-project-id";
    String location = "us-central1";
    String sessionId = "my-session-id";
    String adTagDetailId = "my-ad-tag-detail-id";

    getLiveAdTagDetail(projectId, location, sessionId, adTagDetailId);
  }

  public static void getLiveAdTagDetail(
      String projectId, String location, String sessionId, String adTagDetailId)
      throws IOException {
    // Initialize client that will be used to send requests. This client only needs to be created
    // once, and can be reused for multiple requests. In this example, try-with-resources is used
    // which automatically calls close() on the client to clean up resources.
    try (VideoStitcherServiceClient videoStitcherServiceClient =
        VideoStitcherServiceClient.create()) {
      GetLiveAdTagDetailRequest getLiveAdTagDetailRequest =
          GetLiveAdTagDetailRequest.newBuilder()
              .setName(
                  LiveAdTagDetailName.of(projectId, location, sessionId, adTagDetailId).toString())
              .build();

      LiveAdTagDetail response =
          videoStitcherServiceClient.getLiveAdTagDetail(getLiveAdTagDetailRequest);
      System.out.println("Live ad tag detail: " + response.getName());
    }
  }
}

Node.js

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Node.js 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Node.js API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

/**
 * TODO(developer): Uncomment these variables before running the sample.
 */
// projectId = 'my-project-id';
// location = 'us-central1';
// sessionId = 'my-session-id';
// adTagDetailId = 'my-ad-tag-detail-id';

// Imports the Video Stitcher library
const {VideoStitcherServiceClient} =
  require('@google-cloud/video-stitcher').v1;
// Instantiates a client
const stitcherClient = new VideoStitcherServiceClient();

async function getLiveAdTagDetail() {
  // Construct request
  const request = {
    name: stitcherClient.liveAdTagDetailPath(
      projectId,
      location,
      sessionId,
      adTagDetailId
    ),
  };
  const [adTagDetail] = await stitcherClient.getLiveAdTagDetail(request);
  console.log(`Live ad tag detail: ${adTagDetail.name}`);
}

getLiveAdTagDetail();

PHP

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용PHP 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API PHP API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

use Google\Cloud\Video\Stitcher\V1\Client\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest;

/**
 * Gets the specified ad tag detail for the live session.
 *
 * @param string $callingProjectId     The project ID to run the API call under
 * @param string $location             The location of the session
 * @param string $sessionId            The ID of the session
 * @param string $adTagDetailId        The ID of the ad tag detail
 */
function get_live_ad_tag_detail(
    string $callingProjectId,
    string $location,
    string $sessionId,
    string $adTagDetailId
): void {
    // Instantiate a client.
    $stitcherClient = new VideoStitcherServiceClient();

    $formattedName = $stitcherClient->liveAdTagDetailName($callingProjectId, $location, $sessionId, $adTagDetailId);
    $request = (new GetLiveAdTagDetailRequest())
        ->setName($formattedName);
    $adTagDetail = $stitcherClient->getLiveAdTagDetail($request);

    // Print results
    printf('Live ad tag detail: %s' . PHP_EOL, $adTagDetail->getName());
}

Python

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Python 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Python API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


import argparse

from google.cloud.video import stitcher_v1
from google.cloud.video.stitcher_v1.services.video_stitcher_service import (
    VideoStitcherServiceClient,
)

def get_live_ad_tag_detail(
    project_id: str, location: str, session_id: str, ad_tag_detail_id: str
) -> stitcher_v1.types.LiveAdTagDetail:
    """Gets the specified ad tag detail for a live session.
    Args:
        project_id: The GCP project ID.
        location: The location of the session.
        session_id: The ID of the live session.
        ad_tag_detail_id: The ID of the ad tag details.

    Returns:
        The live ad tag detail resource.
    """

    client = VideoStitcherServiceClient()

    name = client.live_ad_tag_detail_path(
        project_id, location, session_id, ad_tag_detail_id
    )
    response = client.get_live_ad_tag_detail(name=name)
    print(f"Live ad tag detail: {response.name}")
    return response

Ruby

이 샘플을 사용해 보기 전에 Video Stitcher API 빠른 시작: 클라이언트 라이브러리 사용Ruby 설정 안내를 따르세요. 자세한 내용은 Video Stitcher API Ruby API 참조 문서를 확인하세요.

Video Stitcher API에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정하세요. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

require "google/cloud/video/stitcher"

##
# Get the specified ad tag detail for a live session
#
# @param project_id [String] Your Google Cloud project (e.g. "my-project")
# @param location [String] The location (e.g. "us-central1")
# @param session_id [String] The live session ID (e.g. "my-live-session-id")
# @param ad_tag_detail_id [String] The ad tag detail ID (e.g. "my-ad-tag-id")
#
def get_live_ad_tag_detail project_id:, location:, session_id:,
                           ad_tag_detail_id:
  # Create a Video Stitcher client.
  client = Google::Cloud::Video::Stitcher.video_stitcher_service

  # Build the resource name of the live ad tag detail.
  name = client.live_ad_tag_detail_path project: project_id, location: location,
                                        live_session: session_id,
                                        live_ad_tag_detail: ad_tag_detail_id

  # Get the live ad tag detail.
  ad_tag_detail = client.get_live_ad_tag_detail name: name

  # Print the live ad tag detail name.
  puts "Live ad tag detail: #{ad_tag_detail.name}"
end