## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true module Twilio module REST class Microvisor < Domain class V1 < Version class AppContext < InstanceContext ## # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. class AppManifestList < ListResource ## # Initialize the AppManifestList # @param [Version] version Version that contains the resource # @param [String] app_sid A 34-character string that uniquely identifies this App. # @return [AppManifestList] AppManifestList def initialize(version, app_sid: nil) super(version) # Path Solution @solution = {app_sid: app_sid} end ## # Provide a user friendly representation def to_s '#' end end ## # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. class AppManifestPage < Page ## # Initialize the AppManifestPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [AppManifestPage] AppManifestPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of AppManifestInstance # @param [Hash] payload Payload response from the API # @return [AppManifestInstance] AppManifestInstance def get_instance(payload) AppManifestInstance.new(@version, payload, app_sid: @solution[:app_sid], ) end ## # Provide a user friendly representation def to_s '' end end ## # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. class AppManifestContext < InstanceContext ## # Initialize the AppManifestContext # @param [Version] version Version that contains the resource # @param [String] app_sid A 34-character string that uniquely identifies this App. # @return [AppManifestContext] AppManifestContext def initialize(version, app_sid) super(version) # Path Solution @solution = {app_sid: app_sid, } @uri = "/Apps/#{@solution[:app_sid]}/Manifest" end ## # Fetch the AppManifestInstance # @return [AppManifestInstance] Fetched AppManifestInstance def fetch payload = @version.fetch('GET', @uri) AppManifestInstance.new(@version, payload, app_sid: @solution[:app_sid], ) end ## # Provide a user friendly representation def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#" end ## # Provide a detailed, user friendly representation def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#" end end ## # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. class AppManifestInstance < InstanceResource ## # Initialize the AppManifestInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] app_sid A 34-character string that uniquely identifies this App. # @return [AppManifestInstance] AppManifestInstance def initialize(version, payload, app_sid: nil) super(version) # Marshaled Properties @properties = { 'app_sid' => payload['app_sid'], 'hash' => payload['hash'], 'encoded_bytes' => payload['encoded_bytes'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'app_sid' => app_sid, } end ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @return [AppManifestContext] AppManifestContext for this AppManifestInstance def context unless @instance_context @instance_context = AppManifestContext.new(@version, @params['app_sid'], ) end @instance_context end ## # @return [String] A string that uniquely identifies this App. def app_sid @properties['app_sid'] end ## # @return [String] App manifest hash represented as hash_algorithm:hash_value. def hash @properties['hash'] end ## # @return [String] The base-64 encoded manifest def encoded_bytes @properties['encoded_bytes'] end ## # @return [String] The absolute URL of this Manifest. def url @properties['url'] end ## # Fetch the AppManifestInstance # @return [AppManifestInstance] Fetched AppManifestInstance def fetch context.fetch end ## # Provide a user friendly representation def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "" end ## # Provide a detailed, user friendly representation def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "" end end end end end end end