## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true module Twilio module REST class Video < Domain class V1 < Version class RoomContext < InstanceContext ## # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. class RecordingRulesList < ListResource ## # Initialize the RecordingRulesList # @param [Version] version Version that contains the resource # @param [String] room_sid The SID of the Room resource for the Recording Rules # @return [RecordingRulesList] RecordingRulesList def initialize(version, room_sid: nil) super(version) # Path Solution @solution = {room_sid: room_sid} @uri = "/Rooms/#{@solution[:room_sid]}/RecordingRules" end ## # Fetch the RecordingRulesInstance # @return [RecordingRulesInstance] Fetched RecordingRulesInstance def fetch payload = @version.fetch('GET', @uri) RecordingRulesInstance.new(@version, payload, room_sid: @solution[:room_sid], ) end ## # Update the RecordingRulesInstance # @param [Hash] rules A JSON-encoded array of recording rules. # @return [RecordingRulesInstance] Updated RecordingRulesInstance def update(rules: :unset) data = Twilio::Values.of({'Rules' => Twilio.serialize_object(rules), }) payload = @version.update('POST', @uri, data: data) RecordingRulesInstance.new(@version, payload, room_sid: @solution[:room_sid], ) end ## # Provide a user friendly representation def to_s '#' end end ## # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. class RecordingRulesPage < Page ## # Initialize the RecordingRulesPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [RecordingRulesPage] RecordingRulesPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of RecordingRulesInstance # @param [Hash] payload Payload response from the API # @return [RecordingRulesInstance] RecordingRulesInstance def get_instance(payload) RecordingRulesInstance.new(@version, payload, room_sid: @solution[:room_sid], ) end ## # Provide a user friendly representation def to_s '' end end ## # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. class RecordingRulesInstance < InstanceResource ## # Initialize the RecordingRulesInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] room_sid The SID of the Room resource for the Recording Rules # @return [RecordingRulesInstance] RecordingRulesInstance def initialize(version, payload, room_sid: nil) super(version) # Marshaled Properties @properties = { 'room_sid' => payload['room_sid'], 'rules' => payload['rules'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } end ## # @return [String] The SID of the Room resource for the Recording Rules def room_sid @properties['room_sid'] end ## # @return [Array[String]] A collection of recording Rules that describe how to include or exclude matching tracks for recording def rules @properties['rules'] end ## # @return [Time] The ISO 8601 date and time in GMT when the resource was created def date_created @properties['date_created'] end ## # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated def date_updated @properties['date_updated'] end ## # Provide a user friendly representation def to_s "" end ## # Provide a detailed, user friendly representation def inspect "" end end end end end end end