Class: Azure::ContentModerator::Profiles::Latest::ContentModeratorDataClass
- Inherits:
-
Object
- Object
- Azure::ContentModerator::Profiles::Latest::ContentModeratorDataClass
- Defined in:
- lib/profiles/latest/modules/contentmoderator_profile_module.rb
Overview
ContentModeratorDataClass
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#configurable ⇒ Object
readonly
Returns the value of attribute configurable.
-
#image_moderation ⇒ Object
readonly
Returns the value of attribute image_moderation.
-
#list_management_image ⇒ Object
readonly
Returns the value of attribute list_management_image.
-
#list_management_image_lists ⇒ Object
readonly
Returns the value of attribute list_management_image_lists.
-
#list_management_term ⇒ Object
readonly
Returns the value of attribute list_management_term.
-
#list_management_term_lists ⇒ Object
readonly
Returns the value of attribute list_management_term_lists.
-
#model_classes ⇒ Object
readonly
Returns the value of attribute model_classes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#reviews ⇒ Object
readonly
Returns the value of attribute reviews.
-
#text_moderation ⇒ Object
readonly
Returns the value of attribute text_moderation.
Instance Method Summary collapse
- #add_telemetry(client) ⇒ Object
-
#initialize(options = {}) ⇒ ContentModeratorDataClass
constructor
A new instance of ContentModeratorDataClass.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ ContentModeratorDataClass
Returns a new instance of ContentModeratorDataClass.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 84 def initialize( = {}) if .is_a?(Hash) && .length == 0 = else = end reset!() @configurable = self @base_url = [:base_url].nil? ? nil:options[:base_url] = [:options].nil? ? nil:options[:options] @client_0 = Azure::CognitiveServices::ContentModerator::V1_0::ContentModeratorClient.new(configurable.credentials, ) if(@client_0.respond_to?(:subscription_id)) @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) @image_moderation = @client_0.image_moderation @text_moderation = @client_0.text_moderation @list_management_image_lists = @client_0.list_management_image_lists @list_management_term_lists = @client_0.list_management_term_lists @list_management_image = @client_0.list_management_image @list_management_term = @client_0.list_management_term @reviews = @client_0.reviews @model_classes = ModelClasses.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
118 119 120 121 122 123 124 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 118 def method_missing(method, *args) if @client_0.respond_to?method @client_0.send(method, *args) else super end end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def base_url @base_url end |
#configurable ⇒ Object (readonly)
Returns the value of attribute configurable.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def configurable @configurable end |
#image_moderation ⇒ Object (readonly)
Returns the value of attribute image_moderation.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def image_moderation @image_moderation end |
#list_management_image ⇒ Object (readonly)
Returns the value of attribute list_management_image.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def list_management_image @list_management_image end |
#list_management_image_lists ⇒ Object (readonly)
Returns the value of attribute list_management_image_lists.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def list_management_image_lists @list_management_image_lists end |
#list_management_term ⇒ Object (readonly)
Returns the value of attribute list_management_term.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def list_management_term @list_management_term end |
#list_management_term_lists ⇒ Object (readonly)
Returns the value of attribute list_management_term_lists.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def list_management_term_lists @list_management_term_lists end |
#model_classes ⇒ Object (readonly)
Returns the value of attribute model_classes.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def model_classes @model_classes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def end |
#reviews ⇒ Object (readonly)
Returns the value of attribute reviews.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def reviews @reviews end |
#text_moderation ⇒ Object (readonly)
Returns the value of attribute text_moderation.
82 83 84 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82 def text_moderation @text_moderation end |
Instance Method Details
#add_telemetry(client) ⇒ Object
113 114 115 116 |
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 113 def add_telemetry(client) profile_information = 'Profiles/Latest/ContentModerator' client.add_user_agent_information(profile_information) end |