Class: Azure::ContentModerator::Profiles::Latest::ContentModeratorDataClass

Inherits:
Object
  • Object
show all
Defined in:
lib/profiles/latest/modules/contentmoderator_profile_module.rb

Overview

ContentModeratorDataClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  if options.is_a?(Hash) && options.length == 0
    @options = setup_default_options
  else
    @options = options
  end

  reset!(options)

  @configurable = self
  @base_url = options[:base_url].nil? ? nil:options[:base_url]
  @options = options[:options].nil? ? nil:options[:options]

  @client_0 = Azure::CognitiveServices::ContentModerator::V1_0::ContentModeratorClient.new(configurable.credentials, options)
  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_urlObject (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

#configurableObject (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_moderationObject (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_imageObject (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_listsObject (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_termObject (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_listsObject (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_classesObject (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

#optionsObject (readonly)

Returns the value of attribute options.



82
83
84
# File 'lib/profiles/latest/modules/contentmoderator_profile_module.rb', line 82

def options
  @options
end

#reviewsObject (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_moderationObject (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