# coding: utf-8
from enum import Enum
from six import string_types, iteritems
from bitmovin_api_sdk.common.poscheck import poscheck_model
from bitmovin_api_sdk.models.credits import Credits
from bitmovin_api_sdk.models.metadata import Metadata
import pprint
import six
[docs]
class SceneAnalysisDetailsResponse(object):
@poscheck_model
def __init__(self,
scenes=None,
duration=None,
description=None,
title=None,
keywords=None,
ratings=None,
sensitive_topics=None,
iab_sensitive_topic_taxonomies=None,
input_language_codes=None,
credits_=None,
metadata=None):
# type: (list[Scene], float, string_types, string_types, list[string_types], list[Rating], list[string_types], list[string_types], list[string_types], Credits, Metadata) -> None
self._scenes = list()
self._duration = None
self._description = None
self._title = None
self._keywords = list()
self._ratings = list()
self._sensitive_topics = list()
self._iab_sensitive_topic_taxonomies = list()
self._input_language_codes = list()
self._credits = None
self._metadata = None
self.discriminator = None
if scenes is not None:
self.scenes = scenes
if duration is not None:
self.duration = duration
if description is not None:
self.description = description
if title is not None:
self.title = title
if keywords is not None:
self.keywords = keywords
if ratings is not None:
self.ratings = ratings
if sensitive_topics is not None:
self.sensitive_topics = sensitive_topics
if iab_sensitive_topic_taxonomies is not None:
self.iab_sensitive_topic_taxonomies = iab_sensitive_topic_taxonomies
if input_language_codes is not None:
self.input_language_codes = input_language_codes
if credits_ is not None:
self.credits = credits_
if metadata is not None:
self.metadata = metadata
@property
def openapi_types(self):
types = {
'scenes': 'list[Scene]',
'duration': 'float',
'description': 'string_types',
'title': 'string_types',
'keywords': 'list[string_types]',
'ratings': 'list[Rating]',
'sensitive_topics': 'list[string_types]',
'iab_sensitive_topic_taxonomies': 'list[string_types]',
'input_language_codes': 'list[string_types]',
'credits': 'Credits',
'metadata': 'Metadata'
}
return types
@property
def attribute_map(self):
attributes = {
'scenes': 'scenes',
'duration': 'duration',
'description': 'description',
'title': 'title',
'keywords': 'keywords',
'ratings': 'ratings',
'sensitive_topics': 'sensitiveTopics',
'iab_sensitive_topic_taxonomies': 'iabSensitiveTopicTaxonomies',
'input_language_codes': 'inputLanguageCodes',
'credits': 'credits',
'metadata': 'metadata'
}
return attributes
@property
def scenes(self):
# type: () -> list[Scene]
"""Gets the scenes of this SceneAnalysisDetailsResponse.
Scenes identified in the video. (required)
:return: The scenes of this SceneAnalysisDetailsResponse.
:rtype: list[Scene]
"""
return self._scenes
@scenes.setter
def scenes(self, scenes):
# type: (list) -> None
"""Sets the scenes of this SceneAnalysisDetailsResponse.
Scenes identified in the video. (required)
:param scenes: The scenes of this SceneAnalysisDetailsResponse.
:type: list[Scene]
"""
if scenes is not None:
if not isinstance(scenes, list):
raise TypeError("Invalid type for `scenes`, type has to be `list[Scene]`")
self._scenes = scenes
@property
def duration(self):
# type: () -> float
"""Gets the duration of this SceneAnalysisDetailsResponse.
Duration of the analyzed video in seconds.
:return: The duration of this SceneAnalysisDetailsResponse.
:rtype: float
"""
return self._duration
@duration.setter
def duration(self, duration):
# type: (float) -> None
"""Sets the duration of this SceneAnalysisDetailsResponse.
Duration of the analyzed video in seconds.
:param duration: The duration of this SceneAnalysisDetailsResponse.
:type: float
"""
if duration is not None:
if not isinstance(duration, (float, int)):
raise TypeError("Invalid type for `duration`, type has to be `float`")
self._duration = duration
@property
def description(self):
# type: () -> string_types
"""Gets the description of this SceneAnalysisDetailsResponse.
AI-generated summary of the video as a whole. (required)
:return: The description of this SceneAnalysisDetailsResponse.
:rtype: string_types
"""
return self._description
@description.setter
def description(self, description):
# type: (string_types) -> None
"""Sets the description of this SceneAnalysisDetailsResponse.
AI-generated summary of the video as a whole. (required)
:param description: The description of this SceneAnalysisDetailsResponse.
:type: string_types
"""
if description is not None:
if not isinstance(description, string_types):
raise TypeError("Invalid type for `description`, type has to be `string_types`")
self._description = description
@property
def title(self):
# type: () -> string_types
"""Gets the title of this SceneAnalysisDetailsResponse.
Inferred title representing the analyzed content as a whole. If omitted or null, the title is not available.
:return: The title of this SceneAnalysisDetailsResponse.
:rtype: string_types
"""
return self._title
@title.setter
def title(self, title):
# type: (string_types) -> None
"""Sets the title of this SceneAnalysisDetailsResponse.
Inferred title representing the analyzed content as a whole. If omitted or null, the title is not available.
:param title: The title of this SceneAnalysisDetailsResponse.
:type: string_types
"""
if title is not None:
if not isinstance(title, string_types):
raise TypeError("Invalid type for `title`, type has to be `string_types`")
self._title = title
@property
def keywords(self):
# type: () -> list[string_types]
"""Gets the keywords of this SceneAnalysisDetailsResponse.
Free-text keywords describing the video as a whole. Preserve the returned spelling and case. (required)
:return: The keywords of this SceneAnalysisDetailsResponse.
:rtype: list[string_types]
"""
return self._keywords
@keywords.setter
def keywords(self, keywords):
# type: (list) -> None
"""Sets the keywords of this SceneAnalysisDetailsResponse.
Free-text keywords describing the video as a whole. Preserve the returned spelling and case. (required)
:param keywords: The keywords of this SceneAnalysisDetailsResponse.
:type: list[string_types]
"""
if keywords is not None:
if not isinstance(keywords, list):
raise TypeError("Invalid type for `keywords`, type has to be `list[string_types]`")
self._keywords = keywords
@property
def ratings(self):
# type: () -> list[Rating]
"""Gets the ratings of this SceneAnalysisDetailsResponse.
AI-estimated content ratings for the indicated regions and rating systems. (required)
:return: The ratings of this SceneAnalysisDetailsResponse.
:rtype: list[Rating]
"""
return self._ratings
@ratings.setter
def ratings(self, ratings):
# type: (list) -> None
"""Sets the ratings of this SceneAnalysisDetailsResponse.
AI-estimated content ratings for the indicated regions and rating systems. (required)
:param ratings: The ratings of this SceneAnalysisDetailsResponse.
:type: list[Rating]
"""
if ratings is not None:
if not isinstance(ratings, list):
raise TypeError("Invalid type for `ratings`, type has to be `list[Rating]`")
self._ratings = ratings
@property
def sensitive_topics(self):
# type: () -> list[string_types]
"""Gets the sensitive_topics of this SceneAnalysisDetailsResponse.
Sensitive topics for the video as a whole, in free text. This list can differ from the combined scene-level topics. (required)
:return: The sensitive_topics of this SceneAnalysisDetailsResponse.
:rtype: list[string_types]
"""
return self._sensitive_topics
@sensitive_topics.setter
def sensitive_topics(self, sensitive_topics):
# type: (list) -> None
"""Sets the sensitive_topics of this SceneAnalysisDetailsResponse.
Sensitive topics for the video as a whole, in free text. This list can differ from the combined scene-level topics. (required)
:param sensitive_topics: The sensitive_topics of this SceneAnalysisDetailsResponse.
:type: list[string_types]
"""
if sensitive_topics is not None:
if not isinstance(sensitive_topics, list):
raise TypeError("Invalid type for `sensitive_topics`, type has to be `list[string_types]`")
self._sensitive_topics = sensitive_topics
@property
def iab_sensitive_topic_taxonomies(self):
# type: () -> list[string_types]
"""Gets the iab_sensitive_topic_taxonomies of this SceneAnalysisDetailsResponse.
Distinct IAB Content Taxonomy identifiers drawn from the scenes' IAB sensitive-topic annotations. The list can be empty or unavailable even when individual scenes have topic annotations. (required)
:return: The iab_sensitive_topic_taxonomies of this SceneAnalysisDetailsResponse.
:rtype: list[string_types]
"""
return self._iab_sensitive_topic_taxonomies
@iab_sensitive_topic_taxonomies.setter
def iab_sensitive_topic_taxonomies(self, iab_sensitive_topic_taxonomies):
# type: (list) -> None
"""Sets the iab_sensitive_topic_taxonomies of this SceneAnalysisDetailsResponse.
Distinct IAB Content Taxonomy identifiers drawn from the scenes' IAB sensitive-topic annotations. The list can be empty or unavailable even when individual scenes have topic annotations. (required)
:param iab_sensitive_topic_taxonomies: The iab_sensitive_topic_taxonomies of this SceneAnalysisDetailsResponse.
:type: list[string_types]
"""
if iab_sensitive_topic_taxonomies is not None:
if not isinstance(iab_sensitive_topic_taxonomies, list):
raise TypeError("Invalid type for `iab_sensitive_topic_taxonomies`, type has to be `list[string_types]`")
self._iab_sensitive_topic_taxonomies = iab_sensitive_topic_taxonomies
@property
def input_language_codes(self):
# type: () -> list[string_types]
"""Gets the input_language_codes of this SceneAnalysisDetailsResponse.
Language codes identified for spoken dialogue or narration in the source content. Theme-song vocals, lyrics, music and written text are excluded. The list can be empty when no codes were identified, including when the input has no audio stream. These codes do not indicate available translations.
:return: The input_language_codes of this SceneAnalysisDetailsResponse.
:rtype: list[string_types]
"""
return self._input_language_codes
@input_language_codes.setter
def input_language_codes(self, input_language_codes):
# type: (list) -> None
"""Sets the input_language_codes of this SceneAnalysisDetailsResponse.
Language codes identified for spoken dialogue or narration in the source content. Theme-song vocals, lyrics, music and written text are excluded. The list can be empty when no codes were identified, including when the input has no audio stream. These codes do not indicate available translations.
:param input_language_codes: The input_language_codes of this SceneAnalysisDetailsResponse.
:type: list[string_types]
"""
if input_language_codes is not None:
if not isinstance(input_language_codes, list):
raise TypeError("Invalid type for `input_language_codes`, type has to be `list[string_types]`")
self._input_language_codes = input_language_codes
@property
def credits(self):
# type: () -> Credits
"""Gets the credits of this SceneAnalysisDetailsResponse.
Credits extracted from the video's on-screen text.
:return: The credits of this SceneAnalysisDetailsResponse.
:rtype: Credits
"""
return self._credits
@credits.setter
def credits(self, credits_):
# type: (Credits) -> None
"""Sets the credits of this SceneAnalysisDetailsResponse.
Credits extracted from the video's on-screen text.
:param credits_: The credits of this SceneAnalysisDetailsResponse.
:type: Credits
"""
if credits_ is not None:
if not isinstance(credits_, Credits):
raise TypeError("Invalid type for `credits`, type has to be `Credits`")
self._credits = credits_
@property
def metadata(self):
# type: () -> Metadata
"""Gets the metadata of this SceneAnalysisDetailsResponse.
Information about the analysis that generated this result. (required)
:return: The metadata of this SceneAnalysisDetailsResponse.
:rtype: Metadata
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
# type: (Metadata) -> None
"""Sets the metadata of this SceneAnalysisDetailsResponse.
Information about the analysis that generated this result. (required)
:param metadata: The metadata of this SceneAnalysisDetailsResponse.
:type: Metadata
"""
if metadata is not None:
if not isinstance(metadata, Metadata):
raise TypeError("Invalid type for `metadata`, type has to be `Metadata`")
self._metadata = metadata
[docs]
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if value is None:
continue
if isinstance(value, list):
if len(value) == 0:
continue
result[self.attribute_map.get(attr)] = [y.value if isinstance(y, Enum) else y for y in [x.to_dict() if hasattr(x, "to_dict") else x for x in value]]
elif hasattr(value, "to_dict"):
result[self.attribute_map.get(attr)] = value.to_dict()
elif isinstance(value, Enum):
result[self.attribute_map.get(attr)] = value.value
elif isinstance(value, dict):
result[self.attribute_map.get(attr)] = {k: (v.to_dict() if hasattr(v, "to_dict") else v) for (k, v) in value.items()}
else:
result[self.attribute_map.get(attr)] = value
return result
[docs]
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, SceneAnalysisDetailsResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other