Class: OCI::AiVision::Models::AnalyzeVideoStreamResult
- Inherits:
-
Object
- Object
- OCI::AiVision::Models::AnalyzeVideoStreamResult
- Defined in:
- lib/oci/ai_vision/models/analyze_video_stream_result.rb
Overview
Video stream analysis results.
Instance Attribute Summary collapse
-
#errors ⇒ Array<OCI::AiVision::Models::ProcessingError>
Array of possible errors.
-
#image_data ⇒ String
Base 64 encoded frame.
-
#object_detection_model_versions ⇒ Array<OCI::AiVision::Models::ModelVersionDetails>
List of Object Detection model versions.
-
#object_tracking_model_versions ⇒ Array<OCI::AiVision::Models::ModelVersionDetails>
List of Object Tracking model versions.
- #ontology_classes ⇒ OCI::AiVision::Models::OntologyClass
-
#stream_job_id ⇒ String
[Required] OCID of streamJob.
-
#stream_source_id ⇒ String
[Required] OCID of StreamSource.
-
#timestamp ⇒ String
[Required] time stamp of frame in utc.
-
#video_stream_metadata ⇒ OCI::AiVision::Models::VideoStreamMetadata
This attribute is required.
-
#video_stream_objects ⇒ Array<OCI::AiVision::Models::VideoStreamObject>
Tracked objects in a video stream.
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 = {}) ⇒ AnalyzeVideoStreamResult
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 = {}) ⇒ AnalyzeVideoStreamResult
Initializes the object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 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 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 104 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.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. = attributes[:'videoStreamMetadata'] if attributes[:'videoStreamMetadata'] raise 'You cannot provide both :videoStreamMetadata and :video_stream_metadata' if attributes.key?(:'videoStreamMetadata') && attributes.key?(:'video_stream_metadata') self. = attributes[:'video_stream_metadata'] if attributes[:'video_stream_metadata'] self.image_data = attributes[:'imageData'] if attributes[:'imageData'] raise 'You cannot provide both :imageData and :image_data' if attributes.key?(:'imageData') && attributes.key?(:'image_data') self.image_data = attributes[:'image_data'] if attributes[:'image_data'] self.stream_job_id = attributes[:'streamJobId'] if attributes[:'streamJobId'] raise 'You cannot provide both :streamJobId and :stream_job_id' if attributes.key?(:'streamJobId') && attributes.key?(:'stream_job_id') self.stream_job_id = attributes[:'stream_job_id'] if attributes[:'stream_job_id'] self.stream_source_id = attributes[:'streamSourceId'] if attributes[:'streamSourceId'] raise 'You cannot provide both :streamSourceId and :stream_source_id' if attributes.key?(:'streamSourceId') && attributes.key?(:'stream_source_id') self.stream_source_id = attributes[:'stream_source_id'] if attributes[:'stream_source_id'] self. = attributes[:'timestamp'] if attributes[:'timestamp'] self.video_stream_objects = attributes[:'videoStreamObjects'] if attributes[:'videoStreamObjects'] raise 'You cannot provide both :videoStreamObjects and :video_stream_objects' if attributes.key?(:'videoStreamObjects') && attributes.key?(:'video_stream_objects') self.video_stream_objects = attributes[:'video_stream_objects'] if attributes[:'video_stream_objects'] self.object_tracking_model_versions = attributes[:'objectTrackingModelVersions'] if attributes[:'objectTrackingModelVersions'] raise 'You cannot provide both :objectTrackingModelVersions and :object_tracking_model_versions' if attributes.key?(:'objectTrackingModelVersions') && attributes.key?(:'object_tracking_model_versions') self.object_tracking_model_versions = attributes[:'object_tracking_model_versions'] if attributes[:'object_tracking_model_versions'] self.object_detection_model_versions = attributes[:'objectDetectionModelVersions'] if attributes[:'objectDetectionModelVersions'] raise 'You cannot provide both :objectDetectionModelVersions and :object_detection_model_versions' if attributes.key?(:'objectDetectionModelVersions') && attributes.key?(:'object_detection_model_versions') self.object_detection_model_versions = attributes[:'object_detection_model_versions'] if attributes[:'object_detection_model_versions'] self.errors = attributes[:'errors'] if attributes[:'errors'] end |
Instance Attribute Details
#errors ⇒ Array<OCI::AiVision::Models::ProcessingError>
Array of possible errors.
50 51 52 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 50 def errors @errors end |
#image_data ⇒ String
Base 64 encoded frame
20 21 22 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 20 def image_data @image_data end |
#object_detection_model_versions ⇒ Array<OCI::AiVision::Models::ModelVersionDetails>
List of Object Detection model versions.
46 47 48 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 46 def object_detection_model_versions @object_detection_model_versions end |
#object_tracking_model_versions ⇒ Array<OCI::AiVision::Models::ModelVersionDetails>
List of Object Tracking model versions.
42 43 44 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 42 def object_tracking_model_versions @object_tracking_model_versions end |
#ontology_classes ⇒ OCI::AiVision::Models::OntologyClass
12 13 14 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 12 def ontology_classes @ontology_classes end |
#stream_job_id ⇒ String
[Required] OCID of streamJob.
25 26 27 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 25 def stream_job_id @stream_job_id end |
#stream_source_id ⇒ String
[Required] OCID of StreamSource.
30 31 32 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 30 def stream_source_id @stream_source_id end |
#timestamp ⇒ String
[Required] time stamp of frame in utc.
34 35 36 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 34 def @timestamp end |
#video_stream_metadata ⇒ OCI::AiVision::Models::VideoStreamMetadata
This attribute is required.
16 17 18 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 16 def @video_stream_metadata end |
#video_stream_objects ⇒ Array<OCI::AiVision::Models::VideoStreamObject>
Tracked objects in a video stream.
38 39 40 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 38 def video_stream_objects @video_stream_objects end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 53 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'ontology_classes': :'ontologyClasses', 'video_stream_metadata': :'videoStreamMetadata', 'image_data': :'imageData', 'stream_job_id': :'streamJobId', 'stream_source_id': :'streamSourceId', 'timestamp': :'timestamp', 'video_stream_objects': :'videoStreamObjects', 'object_tracking_model_versions': :'objectTrackingModelVersions', 'object_detection_model_versions': :'objectDetectionModelVersions', 'errors': :'errors' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 71 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'ontology_classes': :'OCI::AiVision::Models::OntologyClass', 'video_stream_metadata': :'OCI::AiVision::Models::VideoStreamMetadata', 'image_data': :'String', 'stream_job_id': :'String', 'stream_source_id': :'String', 'timestamp': :'String', 'video_stream_objects': :'Array<OCI::AiVision::Models::VideoStreamObject>', 'object_tracking_model_versions': :'Array<OCI::AiVision::Models::ModelVersionDetails>', 'object_detection_model_versions': :'Array<OCI::AiVision::Models::ModelVersionDetails>', 'errors': :'Array<OCI::AiVision::Models::ProcessingError>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 170 def ==(other) return true if equal?(other) self.class == other.class && ontology_classes == other.ontology_classes && == other. && image_data == other.image_data && stream_job_id == other.stream_job_id && stream_source_id == other.stream_source_id && == other. && video_stream_objects == other.video_stream_objects && object_tracking_model_versions == other.object_tracking_model_versions && object_detection_model_versions == other.object_detection_model_versions && errors == other.errors end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 209 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
189 190 191 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 189 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
198 199 200 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 198 def hash [ontology_classes, , image_data, stream_job_id, stream_source_id, , video_stream_objects, object_tracking_model_versions, object_detection_model_versions, errors].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 242 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
236 237 238 |
# File 'lib/oci/ai_vision/models/analyze_video_stream_result.rb', line 236 def to_s to_hash.to_s end |