Class: OCI::AiVision::Models::AnalyzeVideoResult
- Inherits:
-
Object
- Object
- OCI::AiVision::Models::AnalyzeVideoResult
- Defined in:
- lib/oci/ai_vision/models/analyze_video_result.rb
Overview
Video analysis results.
Instance Attribute Summary collapse
-
#errors ⇒ Array<OCI::AiVision::Models::ProcessingError>
Array of possible errors.
-
#face_detection_model_version ⇒ String
Face Detection model version.
-
#label_detection_model_version ⇒ String
Label Detection model version.
-
#object_detection_model_version ⇒ String
Object Detection model version.
-
#object_tracking_model_version ⇒ String
Object Tracking model version.
-
#ontology_classes ⇒ Array<OCI::AiVision::Models::OntologyClass>
The ontologyClasses of video labels.
-
#text_detection_model_version ⇒ String
Text Detection model version.
-
#video_faces ⇒ Array<OCI::AiVision::Models::VideoFace>
Detected faces in a video.
-
#video_labels ⇒ Array<OCI::AiVision::Models::VideoLabel>
Detected labels in a video.
-
#video_metadata ⇒ OCI::AiVision::Models::VideoMetadata
This attribute is required.
-
#video_objects ⇒ Array<OCI::AiVision::Models::VideoObject>
Detected objects in a video.
-
#video_text ⇒ Array<OCI::AiVision::Models::VideoText>
Detected text in a video.
-
#video_tracked_objects ⇒ Array<OCI::AiVision::Models::VideoTrackedObject>
Tracked objects in a video.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AnalyzeVideoResult
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ AnalyzeVideoResult
Initializes the object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 124 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self. = attributes[:'videoMetadata'] if attributes[:'videoMetadata'] raise 'You cannot provide both :videoMetadata and :video_metadata' if attributes.key?(:'videoMetadata') && attributes.key?(:'video_metadata') self. = attributes[:'video_metadata'] if attributes[:'video_metadata'] self.video_labels = attributes[:'videoLabels'] if attributes[:'videoLabels'] raise 'You cannot provide both :videoLabels and :video_labels' if attributes.key?(:'videoLabels') && attributes.key?(:'video_labels') self.video_labels = attributes[:'video_labels'] if attributes[:'video_labels'] self.video_objects = attributes[:'videoObjects'] if attributes[:'videoObjects'] raise 'You cannot provide both :videoObjects and :video_objects' if attributes.key?(:'videoObjects') && attributes.key?(:'video_objects') self.video_objects = attributes[:'video_objects'] if attributes[:'video_objects'] self.video_tracked_objects = attributes[:'videoTrackedObjects'] if attributes[:'videoTrackedObjects'] raise 'You cannot provide both :videoTrackedObjects and :video_tracked_objects' if attributes.key?(:'videoTrackedObjects') && attributes.key?(:'video_tracked_objects') self.video_tracked_objects = attributes[:'video_tracked_objects'] if attributes[:'video_tracked_objects'] self.video_text = attributes[:'videoText'] if attributes[:'videoText'] raise 'You cannot provide both :videoText and :video_text' if attributes.key?(:'videoText') && attributes.key?(:'video_text') self.video_text = attributes[:'video_text'] if attributes[:'video_text'] self.video_faces = attributes[:'videoFaces'] if attributes[:'videoFaces'] raise 'You cannot provide both :videoFaces and :video_faces' if attributes.key?(:'videoFaces') && attributes.key?(:'video_faces') self.video_faces = attributes[:'video_faces'] if attributes[:'video_faces'] self.ontology_classes = attributes[:'ontologyClasses'] if attributes[:'ontologyClasses'] raise 'You cannot provide both :ontologyClasses and :ontology_classes' if attributes.key?(:'ontologyClasses') && attributes.key?(:'ontology_classes') self.ontology_classes = attributes[:'ontology_classes'] if attributes[:'ontology_classes'] self.label_detection_model_version = attributes[:'labelDetectionModelVersion'] if attributes[:'labelDetectionModelVersion'] raise 'You cannot provide both :labelDetectionModelVersion and :label_detection_model_version' if attributes.key?(:'labelDetectionModelVersion') && attributes.key?(:'label_detection_model_version') self.label_detection_model_version = attributes[:'label_detection_model_version'] if attributes[:'label_detection_model_version'] self.object_detection_model_version = attributes[:'objectDetectionModelVersion'] if attributes[:'objectDetectionModelVersion'] raise 'You cannot provide both :objectDetectionModelVersion and :object_detection_model_version' if attributes.key?(:'objectDetectionModelVersion') && attributes.key?(:'object_detection_model_version') self.object_detection_model_version = attributes[:'object_detection_model_version'] if attributes[:'object_detection_model_version'] self.object_tracking_model_version = attributes[:'objectTrackingModelVersion'] if attributes[:'objectTrackingModelVersion'] raise 'You cannot provide both :objectTrackingModelVersion and :object_tracking_model_version' if attributes.key?(:'objectTrackingModelVersion') && attributes.key?(:'object_tracking_model_version') self.object_tracking_model_version = attributes[:'object_tracking_model_version'] if attributes[:'object_tracking_model_version'] self.text_detection_model_version = attributes[:'textDetectionModelVersion'] if attributes[:'textDetectionModelVersion'] raise 'You cannot provide both :textDetectionModelVersion and :text_detection_model_version' if attributes.key?(:'textDetectionModelVersion') && attributes.key?(:'text_detection_model_version') self.text_detection_model_version = attributes[:'text_detection_model_version'] if attributes[:'text_detection_model_version'] self.face_detection_model_version = attributes[:'faceDetectionModelVersion'] if attributes[:'faceDetectionModelVersion'] raise 'You cannot provide both :faceDetectionModelVersion and :face_detection_model_version' if attributes.key?(:'faceDetectionModelVersion') && attributes.key?(:'face_detection_model_version') self.face_detection_model_version = attributes[:'face_detection_model_version'] if attributes[:'face_detection_model_version'] self.errors = attributes[:'errors'] if attributes[:'errors'] end |
Instance Attribute Details
#errors ⇒ Array<OCI::AiVision::Models::ProcessingError>
Array of possible errors.
61 62 63 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 61 def errors @errors end |
#face_detection_model_version ⇒ String
Face Detection model version.
57 58 59 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 57 def face_detection_model_version @face_detection_model_version end |
#label_detection_model_version ⇒ String
Label Detection model version.
41 42 43 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 41 def label_detection_model_version @label_detection_model_version end |
#object_detection_model_version ⇒ String
Object Detection model version.
45 46 47 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 45 def object_detection_model_version @object_detection_model_version end |
#object_tracking_model_version ⇒ String
Object Tracking model version.
49 50 51 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 49 def object_tracking_model_version @object_tracking_model_version end |
#ontology_classes ⇒ Array<OCI::AiVision::Models::OntologyClass>
The ontologyClasses of video labels.
37 38 39 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 37 def ontology_classes @ontology_classes end |
#text_detection_model_version ⇒ String
Text Detection model version.
53 54 55 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 53 def text_detection_model_version @text_detection_model_version end |
#video_faces ⇒ Array<OCI::AiVision::Models::VideoFace>
Detected faces in a video.
33 34 35 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 33 def video_faces @video_faces end |
#video_labels ⇒ Array<OCI::AiVision::Models::VideoLabel>
Detected labels in a video.
17 18 19 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 17 def video_labels @video_labels end |
#video_metadata ⇒ OCI::AiVision::Models::VideoMetadata
This attribute is required.
13 14 15 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 13 def @video_metadata end |
#video_objects ⇒ Array<OCI::AiVision::Models::VideoObject>
Detected objects in a video.
21 22 23 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 21 def video_objects @video_objects end |
#video_text ⇒ Array<OCI::AiVision::Models::VideoText>
Detected text in a video.
29 30 31 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 29 def video_text @video_text end |
#video_tracked_objects ⇒ Array<OCI::AiVision::Models::VideoTrackedObject>
Tracked objects in a video.
25 26 27 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 25 def video_tracked_objects @video_tracked_objects end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 64 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'video_metadata': :'videoMetadata', 'video_labels': :'videoLabels', 'video_objects': :'videoObjects', 'video_tracked_objects': :'videoTrackedObjects', 'video_text': :'videoText', 'video_faces': :'videoFaces', 'ontology_classes': :'ontologyClasses', 'label_detection_model_version': :'labelDetectionModelVersion', 'object_detection_model_version': :'objectDetectionModelVersion', 'object_tracking_model_version': :'objectTrackingModelVersion', 'text_detection_model_version': :'textDetectionModelVersion', 'face_detection_model_version': :'faceDetectionModelVersion', 'errors': :'errors' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 85 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'video_metadata': :'OCI::AiVision::Models::VideoMetadata', 'video_labels': :'Array<OCI::AiVision::Models::VideoLabel>', 'video_objects': :'Array<OCI::AiVision::Models::VideoObject>', 'video_tracked_objects': :'Array<OCI::AiVision::Models::VideoTrackedObject>', 'video_text': :'Array<OCI::AiVision::Models::VideoText>', 'video_faces': :'Array<OCI::AiVision::Models::VideoFace>', 'ontology_classes': :'Array<OCI::AiVision::Models::OntologyClass>', 'label_detection_model_version': :'String', 'object_detection_model_version': :'String', 'object_tracking_model_version': :'String', 'text_detection_model_version': :'String', 'face_detection_model_version': :'String', 'errors': :'Array<OCI::AiVision::Models::ProcessingError>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 212 def ==(other) return true if equal?(other) self.class == other.class && == other. && video_labels == other.video_labels && video_objects == other.video_objects && video_tracked_objects == other.video_tracked_objects && video_text == other.video_text && video_faces == other.video_faces && ontology_classes == other.ontology_classes && label_detection_model_version == other.label_detection_model_version && object_detection_model_version == other.object_detection_model_version && object_tracking_model_version == other.object_tracking_model_version && text_detection_model_version == other.text_detection_model_version && face_detection_model_version == other.face_detection_model_version && errors == other.errors end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 254 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
234 235 236 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 234 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
243 244 245 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 243 def hash [, video_labels, video_objects, video_tracked_objects, video_text, video_faces, ontology_classes, label_detection_model_version, object_detection_model_version, object_tracking_model_version, text_detection_model_version, face_detection_model_version, errors].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
287 288 289 290 291 292 293 294 295 296 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 287 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
281 282 283 |
# File 'lib/oci/ai_vision/models/analyze_video_result.rb', line 281 def to_s to_hash.to_s end |