Class: Azure::Face::Profiles::Latest::FaceDataClass

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

Overview

FaceDataClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ FaceDataClass

Returns a new instance of FaceDataClass.



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
112
113
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 85

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::Face::V1_0::FaceClient.new(configurable.credentials, options)
  if(@client_0.respond_to?(:subscription_id))
    @client_0.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_0)
  @face = @client_0.face
  @person_group_person = @client_0.person_group_person
  @person_group_operations = @client_0.person_group_operations
  @face_list_operations = @client_0.face_list_operations
  @large_person_group_person = @client_0.large_person_group_person
  @large_person_group_operations = @client_0.large_person_group_operations
  @large_face_list_operations = @client_0.large_face_list_operations
  @snapshot_operations = @client_0.snapshot_operations

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



120
121
122
123
124
125
126
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 120

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.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def base_url
  @base_url
end

#configurableObject (readonly)

Returns the value of attribute configurable.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def configurable
  @configurable
end

#faceObject (readonly)

Returns the value of attribute face.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def face
  @face
end

#face_list_operationsObject (readonly)

Returns the value of attribute face_list_operations.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def face_list_operations
  @face_list_operations
end

#large_face_list_operationsObject (readonly)

Returns the value of attribute large_face_list_operations.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def large_face_list_operations
  @large_face_list_operations
end

#large_person_group_operationsObject (readonly)

Returns the value of attribute large_person_group_operations.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def large_person_group_operations
  @large_person_group_operations
end

#large_person_group_personObject (readonly)

Returns the value of attribute large_person_group_person.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def large_person_group_person
  @large_person_group_person
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def model_classes
  @model_classes
end

#optionsObject (readonly)

Returns the value of attribute options.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def options
  @options
end

#person_group_operationsObject (readonly)

Returns the value of attribute person_group_operations.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def person_group_operations
  @person_group_operations
end

#person_group_personObject (readonly)

Returns the value of attribute person_group_person.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def person_group_person
  @person_group_person
end

#snapshot_operationsObject (readonly)

Returns the value of attribute snapshot_operations.



83
84
85
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 83

def snapshot_operations
  @snapshot_operations
end

Instance Method Details

#add_telemetry(client) ⇒ Object



115
116
117
118
# File 'lib/profiles/latest/modules/face_profile_module.rb', line 115

def add_telemetry(client)
  profile_information = 'Profiles/Latest/Face'
  client.add_user_agent_information(profile_information)
end