Class: WscSdk::Models::WowzaStreamTarget

Inherits:
WscSdk::Model show all
Defined in:
lib/wsc_sdk/models/wowza_stream_target.rb

Overview

A model to represent a Wowza Stream Target in the Wowza Streaming Cloud API.

Instance Attribute Summary

Attributes inherited from WscSdk::Model

#attributes, #changes, #data_mode, #endpoint, #errors, #partial_data

Instance Method Summary collapse

Methods inherited from WscSdk::Model

#add_error, attribute, #build_payload, #build_payload!, #clean!, #clear_primary_key, #delete, #dirty?, #has_attribute?, #ingest_attribute, #ingest_attributes, #initialize, #initialize_attributes, model_name_plural, model_name_singular, #new_model?, #primary_key, primary_key, #primary_key_attribute, #refresh, #save, #schema, schema, #success?, #valid!, #valid?, #validate

Methods included from Loggable

#logger, #logger=

Methods included from ApiResponse

#success?

Constructor Details

This class inherits a constructor from WscSdk::Model

Instance Method Details

#new_location_accessSymbol

Location can only be set if its a new record and not an Akmai Cupertino provider.

Returns:

  • (Symbol)

    Returns :read_write if it's a new model and not a Akamai Cupertino provider, or :read otherwise.



54
55
56
# File 'lib/wsc_sdk/models/wowza_stream_target.rb', line 54

def new_location_access
  (self.new_model? and not self.provider.start_with?("akamai_cupertino")) ? :read_write : :read
end

#new_model_accessSymbol

Determines the access level of the model based on whether it's a new model or not.

Returns:

  • (Symbol)

    Returns :read_write if it's a new model, or :read if it's not.



43
44
45
# File 'lib/wsc_sdk/models/wowza_stream_target.rb', line 43

def new_model_access
  self.new_model? ? :read_write : :read
end