// Copyright 2022 LTN Global Communications, Inc. // // 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 // // http://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. syntax = "proto3"; package tv.make.api; import "output/target/outputtarget.proto"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option go_package = "git.ltnglobal.com/make.tv/genproto/api;api"; service OutputTargetService { // Lists targets of an output. rpc ListOutputTargets(ListOutputTargetsRequest) returns (ListOutputTargetsResponse) { option (google.api.http) = { get: "/v1/teams/{team_id}/outputs/{output_id}/targets" }; } // Gets a target. rpc GetOutputTarget(GetOutputTargetRequest) returns (OutputTarget) { option (google.api.http) = { get: "/v1/teams/{team_id}/outputs/{output_id}/targets/{target_id}" }; } // Creates a target. rpc CreateOutputTarget(CreateOutputTargetRequest) returns (OutputTarget) { option (google.api.http) = { post: "/v1/teams/{target.team_id}/outputs/{target.output_id}/targets" body: "target" }; } // Updates a target. rpc UpdateOutputTarget(UpdateOutputTargetRequest) returns (OutputTarget) { option (google.api.http) = { patch: "/v1/teams/{target.team_id}/outputs/{target.output_id}/targets/{target.id}" body: "target" }; } // Deletes a target. rpc DeleteOutputTarget(DeleteOutputTargetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/teams/{team_id}/outputs/{output_id}/targets/{target_id}" }; } // Get properties of output targets. rpc GetOutputTargetProperties (GetOutputTargetPropertiesRequest) returns (GetOutputTargetPropertiesResponse) { option (google.api.http) = { get: "/v1/teams/{team_id}/outputs/-/targets:getProperties" }; } } // Request message for [ListOutputTargets][tv.make.api.OutputTargetService.ListOutputTargets]. message ListOutputTargetsRequest { // The unique identifier of the output owning the targets. string output_id = 1; // The unique identifier of the team owning the output. string team_id = 2; // The maximum number of items to return. int32 page_size = 3; // The next_page_token value returned from a previous List request, if any. string page_token = 4; // Specifies the result ordering for List requests. string order_by = 5; } // Response message for [ListOutputTargets][tv.make.api.OutputTargetService.ListOutputTargets]. message ListOutputTargetsResponse { // The list of output target. repeated OutputTarget targets = 1; // Token to retrieve the next page of results, or empty if there are no // more results in the list. string next_page_token = 3; } message GetOutputTargetRequest { // The unique identifier of the target. string target_id = 1; // The unique identifier of the output owning the target. string output_id = 2; // The unique identifier of the team owning the output. string team_id = 3; } message CreateOutputTargetRequest { // The target to create. OutputTarget target = 1; // The unique identifier of the request. // // If present, the create request will be ignored for subsequent // retries with the same id. // // [optional] string request_id = 2; } message UpdateOutputTargetRequest { // The output target resource which replaces the resource on the server. OutputTarget target = 1; // The update mask applies to the resource. For the `FieldMask` definition, // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask google.protobuf.FieldMask update_mask = 2; } message DeleteOutputTargetRequest { // The unique identifier of the target. string target_id = 1; // The unique identifier of the output owning the target. string output_id = 2; // The unique identifier of the team owning the output. string team_id = 3; } message GetOutputTargetPropertiesRequest { // The type of the target. OutputTarget.Type target_type = 1; // The unique identifier of the team owning the output. string team_id = 2; // The unique identifier of the account for which the properties are queried. // // MUST be provided when the target type expects an account (not a CUSTOM_* target). // // [optional] string account_id = 3; } message GetOutputTargetPropertiesResponse { repeated OutputTarget.Property properties = 1; }