# frozen_string_literal: true # Copyright 2022 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! module Google module Cloud module Video module LiveStream module V1 # Input resource represents the endpoint from which the channel ingests # the input stream. # @!attribute [rw] name # @return [::String] # The resource name of the input, in the form of: # `projects/{project}/locations/{location}/inputs/{inputId}`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The creation time. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The update time. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # User-defined key/value metadata. # @!attribute [rw] type # @return [::Google::Cloud::Video::LiveStream::V1::Input::Type] # Source type. # @!attribute [rw] tier # @return [::Google::Cloud::Video::LiveStream::V1::Input::Tier] # Tier defines the maximum input specification that is accepted by the # video pipeline. The billing is charged based on the tier specified here. # See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. # The default is `HD`. # @!attribute [r] uri # @return [::String] # Output only. URI to push the input stream to. # Its format depends on the input {::Google::Cloud::Video::LiveStream::V1::Input#type type}, for example: # # * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` # * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` # @!attribute [rw] preprocessing_config # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig] # Preprocessing configurations. # @!attribute [rw] security_rules # @return [::Google::Cloud::Video::LiveStream::V1::Input::SecurityRule] # Security rule for access control. # @!attribute [r] input_stream_property # @return [::Google::Cloud::Video::LiveStream::V1::InputStreamProperty] # Output only. The information for the input stream. This field will be present only when # this input receives the input stream. class Input include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Security rules for access control. Each field represents one security rule. # Only when the source of the input stream satisfies all the fields, this # input stream can be accepted. # @!attribute [rw] ip_ranges # @return [::Array<::String>] # At least one ip range must match unless none specified. The IP range is # defined by CIDR block: for example, `192.0.1.0/24` for a range and # `192.0.1.0/32` for a single IP address. class SecurityRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The type of the input. module Type # Input type is not specified. TYPE_UNSPECIFIED = 0 # Input will take an rtmp input stream. RTMP_PUSH = 1 # Input will take an srt (Secure Reliable Transport) input stream. SRT_PUSH = 2 end # Tier of the input specification. module Tier # Tier is not specified. TIER_UNSPECIFIED = 0 # Resolution < 1280x720. Bitrate <= 6 Mbps. FPS <= 60. SD = 1 # Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. HD = 2 # Resolution <= 4096x2160. Not supported yet. UHD = 3 end end # Channel resource represents the processor that does a user-defined # "streaming" operation, which includes getting an input stream through an # input, transcoding it to multiple renditions, and publishing output live # streams in certain formats (for example, HLS or DASH) to the specified # location. # @!attribute [rw] name # @return [::String] # The resource name of the channel, in the form of: # `projects/{project}/locations/{location}/channels/{channelId}`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The creation time. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The update time. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # User-defined key/value metadata. # @!attribute [rw] input_attachments # @return [::Array<::Google::Cloud::Video::LiveStream::V1::InputAttachment>] # A list of input attachments that this channel uses. # One channel can have multiple inputs as the input sources. Only one # input can be selected as the input source at one time. # @!attribute [r] active_input # @return [::String] # Output only. The {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} that serves as the current input source. The # first input in the {::Google::Cloud::Video::LiveStream::V1::Channel#input_attachments input_attachments} is the initial input source. # @!attribute [rw] output # @return [::Google::Cloud::Video::LiveStream::V1::Channel::Output] # Required. Information about the output (that is, the Cloud Storage bucket to store # the generated live stream). # @!attribute [rw] elementary_streams # @return [::Array<::Google::Cloud::Video::LiveStream::V1::ElementaryStream>] # List of elementary streams. # @!attribute [rw] mux_streams # @return [::Array<::Google::Cloud::Video::LiveStream::V1::MuxStream>] # List of multiplexing settings for output streams. # @!attribute [rw] manifests # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Manifest>] # List of output manifests. # @!attribute [rw] sprite_sheets # @return [::Array<::Google::Cloud::Video::LiveStream::V1::SpriteSheet>] # List of output sprite sheets. # @!attribute [r] streaming_state # @return [::Google::Cloud::Video::LiveStream::V1::Channel::StreamingState] # Output only. State of the streaming operation. # @!attribute [r] streaming_error # @return [::Google::Rpc::Status] # Output only. A description of the reason for the streaming error. This property is # always present when {::Google::Cloud::Video::LiveStream::V1::Channel#streaming_state streaming_state} is # {::Google::Cloud::Video::LiveStream::V1::Channel::StreamingState::STREAMING_ERROR STREAMING_ERROR}. # @!attribute [rw] log_config # @return [::Google::Cloud::Video::LiveStream::V1::LogConfig] # Configuration of platform logs for this channel. class Channel include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Location of output file(s) in a Google Cloud Storage bucket. # @!attribute [rw] uri # @return [::String] # URI for the output file(s). For example, `gs://my-bucket/outputs/`. class Output include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State of streaming operation that the channel is running. module StreamingState # Streaming state is not specified. STREAMING_STATE_UNSPECIFIED = 0 # Channel is getting the input stream, generating the live streams to the # specified output location. STREAMING = 1 # Channel is waiting for the input stream through the input. Live streams # do not start yet. AWAITING_INPUT = 2 # Channel is running, but has trouble publishing the live streams onto the # specified output location (for example, the specified Cloud Storage # bucket is not writable). STREAMING_ERROR = 4 # Channel is generating live streams with no input stream. Live streams are # filled out with black screen, while input stream is missing. STREAMING_NO_INPUT = 5 # Channel is stopped, finishing live streams. STOPPED = 6 # Channel is starting. STARTING = 7 # Channel is stopping. STOPPING = 8 end end # Configuration of platform logs. # See [Using and managing platform # logs](https://cloud.google.com/logging/docs/api/platform-logs#managing-logs) # for more information about how to view platform logs through Cloud Logging. # @!attribute [rw] log_severity # @return [::Google::Cloud::Video::LiveStream::V1::LogConfig::LogSeverity] # The severity level of platform logging for this resource. class LogConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The severity level of platform logging for this channel. Logs with a # severity level higher than or equal to the chosen severity level will be # logged and can be viewed through Cloud Logging. # The severity level of a log is ranked as followed from low to high: DEBUG < # INFO < NOTICE < WARNING < ERROR < CRITICAL < ALERT < EMERGENCY. # See # [LogSeverity](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity) # for more information. module LogSeverity # Log severity is not specified. This is the same as log severity is OFF. LOG_SEVERITY_UNSPECIFIED = 0 # Log is turned off. OFF = 1 # Log with severity higher than or equal to DEBUG are logged. DEBUG = 100 # Logs with severity higher than or equal to INFO are logged. INFO = 200 # Logs with severity higher than or equal to WARNING are logged. WARNING = 400 # Logs with severity higher than or equal to ERROR are logged. ERROR = 500 end end # Properties of the input stream. # @!attribute [rw] last_establish_time # @return [::Google::Protobuf::Timestamp] # The time that the current input stream is accepted and the connection is # established. # @!attribute [rw] video_streams # @return [::Array<::Google::Cloud::Video::LiveStream::V1::VideoStreamProperty>] # Properties of the video streams. # @!attribute [rw] audio_streams # @return [::Array<::Google::Cloud::Video::LiveStream::V1::AudioStreamProperty>] # Properties of the audio streams. class InputStreamProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Properties of the video stream. # @!attribute [rw] index # @return [::Integer] # Index of this video stream. # @!attribute [rw] video_format # @return [::Google::Cloud::Video::LiveStream::V1::VideoFormat] # Properties of the video format. class VideoStreamProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Properties of the video format. # @!attribute [rw] codec # @return [::String] # Video codec used in this video stream. # @!attribute [rw] width_pixels # @return [::Integer] # The width of the video stream in pixels. # @!attribute [rw] height_pixels # @return [::Integer] # The height of the video stream in pixels. # @!attribute [rw] frame_rate # @return [::Float] # The frame rate of the input video stream. class VideoFormat include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Properties of the audio stream. # @!attribute [rw] index # @return [::Integer] # Index of this audio stream. # @!attribute [rw] audio_format # @return [::Google::Cloud::Video::LiveStream::V1::AudioFormat] # Properties of the audio format. class AudioStreamProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Properties of the audio format. # @!attribute [rw] codec # @return [::String] # Audio codec used in this audio stream. # @!attribute [rw] channel_count # @return [::Integer] # The number of audio channels. # @!attribute [rw] channel_layout # @return [::Array<::String>] # A list of channel names specifying the layout of the audio channels. class AudioFormat include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A group of information for attaching an input resource to this channel. # @!attribute [rw] key # @return [::String] # A unique key for this input attachment. # @!attribute [rw] input # @return [::String] # The resource name of an existing input, in the form of: # `projects/{project}/locations/{location}/inputs/{inputId}`. # @!attribute [rw] automatic_failover # @return [::Google::Cloud::Video::LiveStream::V1::InputAttachment::AutomaticFailover] # Automatic failover configurations. class InputAttachment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Configurations to follow when automatic failover happens. # @!attribute [rw] input_keys # @return [::Array<::String>] # The {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key}s of inputs to failover to when this input is # disconnected. Currently, only up to one backup input is supported. class AutomaticFailover include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Event is a sub-resource of a channel, which can be scheduled by the user to # execute operations on a channel resource without having to stop the channel. # @!attribute [rw] name # @return [::String] # The resource name of the event, in the form of: # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The creation time. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The update time. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # User-defined key/value metadata. # @!attribute [rw] ad_break # @return [::Google::Cloud::Video::LiveStream::V1::Event::AdBreakTask] # Required. Inserts a new ad opportunity. # @!attribute [rw] execute_now # @return [::Boolean] # When this field is set to true, the event will be executed at the earliest # time that the server can schedule the event and {::Google::Cloud::Video::LiveStream::V1::Event#execution_time execution_time} will be # populated with the time that the server actually schedules the event. # @!attribute [rw] execution_time # @return [::Google::Protobuf::Timestamp] # The time when the event should be executed. When {::Google::Cloud::Video::LiveStream::V1::Event#execute_now execute_now} is set to # `true`, this field should not be set in `CreateEvent` request and will be # populated with the time that the server schedules the event. # @!attribute [r] state # @return [::Google::Cloud::Video::LiveStream::V1::Event::State] # Output only. The state of the event. # @!attribute [r] error # @return [::Google::Rpc::Status] # Output only. An error object that describes the reason for the failure. # This property is always present when `state` is `FAILED`. class Event include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Inserts a new ad opportunity. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of an ad opportunity. Must be greater than 0. class AdBreakTask include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State of the event module State # Event state is not specified. STATE_UNSPECIFIED = 0 # Event is scheduled but not executed yet. SCHEDULED = 1 # Event is being executed. RUNNING = 2 # Event has been successfully executed. SUCCEEDED = 3 # Event fails to be executed. FAILED = 4 # Event has been created but not scheduled yet. PENDING = 5 end end end end end end end