INSTRUCTION stringlengths 1 8.43k | RESPONSE stringlengths 75 104k |
|---|---|
Initialize a ListCollectionFieldsResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a ListCollectionFieldsResponse object from a json dictionary."""
args = {}
if 'fields' in _dict:
args['fields'] = [
Field._from_dict(x) for x in (_dict.get('fields'))
]
return cls(**args) |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'fields') and self.fields is not None:
_dict['fields'] = [x._to_dict() for x in self.fields]
return _dict |
Initialize a ListCollectionsResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a ListCollectionsResponse object from a json dictionary."""
args = {}
if 'collections' in _dict:
args['collections'] = [
Collection._from_dict(x) for x in (_dict.get('collections'))
]
return cls(**args) |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'collections') and self.collections is not None:
_dict['collections'] = [x._to_dict() for x in self.collections]
return _dict |
Initialize a ListConfigurationsResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a ListConfigurationsResponse object from a json dictionary."""
args = {}
if 'configurations' in _dict:
args['configurations'] = [
Configuration._from_dict(x)
for x in (_dict.get('configurations'))
]... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'configurations') and self.configurations is not None:
_dict['configurations'] = [
x._to_dict() for x in self.configurations
]
return _dict |
Initialize a ListEnvironmentsResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a ListEnvironmentsResponse object from a json dictionary."""
args = {}
if 'environments' in _dict:
args['environments'] = [
Environment._from_dict(x) for x in (_dict.get('environments'))
]
return cls(**args... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'environments') and self.environments is not None:
_dict['environments'] = [x._to_dict() for x in self.environments]
return _dict |
Initialize a LogQueryResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a LogQueryResponse object from a json dictionary."""
args = {}
if 'matching_results' in _dict:
args['matching_results'] = _dict.get('matching_results')
if 'results' in _dict:
args['results'] = [
LogQueryRes... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'matching_results') and self.matching_results is not None:
_dict['matching_results'] = self.matching_results
if hasattr(self, 'results') and self.results... |
Initialize a LogQueryResponseResult object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a LogQueryResponseResult object from a json dictionary."""
args = {}
if 'environment_id' in _dict:
args['environment_id'] = _dict.get('environment_id')
if 'customer_id' in _dict:
args['customer_id'] = _dict.get('customer_i... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'environment_id') and self.environment_id is not None:
_dict['environment_id'] = self.environment_id
if hasattr(self, 'customer_id') and self.customer_id is not None:
... |
Initialize a LogQueryResponseResultDocuments object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a LogQueryResponseResultDocuments object from a json dictionary."""
args = {}
if 'results' in _dict:
args['results'] = [
LogQueryResponseResultDocumentsResult._from_dict(x)
for x in (_dict.get('results'))
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'results') and self.results is not None:
_dict['results'] = [x._to_dict() for x in self.results]
if hasattr(self, 'count') and self.count is not None:
_dict['co... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'position') and self.position is not None:
_dict['position'] = self.position
if hasattr(self, 'document_id') and self.document_id is not None:
_dict['document_i... |
Initialize a MetricAggregation object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a MetricAggregation object from a json dictionary."""
args = {}
if 'interval' in _dict:
args['interval'] = _dict.get('interval')
if 'event_type' in _dict:
args['event_type'] = _dict.get('event_type')
if 'results' i... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'interval') and self.interval is not None:
_dict['interval'] = self.interval
if hasattr(self, 'event_type') and self.event_type is not None:
_dict['event_type']... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'key_as_string') and self.key_as_string is not None:
_dict['key_as_string'] = datetime_to_string(self.key_as_string)
if hasattr(self, 'key') and self.key is not None:
... |
Initialize a MetricResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a MetricResponse object from a json dictionary."""
args = {}
if 'aggregations' in _dict:
args['aggregations'] = [
MetricAggregation._from_dict(x)
for x in (_dict.get('aggregations'))
]
retur... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'aggregations') and self.aggregations is not None:
_dict['aggregations'] = [x._to_dict() for x in self.aggregations]
return _dict |
Initialize a MetricTokenAggregation object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a MetricTokenAggregation object from a json dictionary."""
args = {}
if 'event_type' in _dict:
args['event_type'] = _dict.get('event_type')
if 'results' in _dict:
args['results'] = [
MetricTokenAggregationR... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'key') and self.key is not None:
_dict['key'] = self.key
if hasattr(self,
'matching_results') and self.matching_results is not None:
_dict['m... |
Initialize a MetricTokenResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a MetricTokenResponse object from a json dictionary."""
args = {}
if 'aggregations' in _dict:
args['aggregations'] = [
MetricTokenAggregation._from_dict(x)
for x in (_dict.get('aggregations'))
]
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'path') and self.path is not None:
_dict['path'] = self.path
return _dict |
Initialize a NluEnrichmentFeatures object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a NluEnrichmentFeatures object from a json dictionary."""
args = {}
if 'keywords' in _dict:
args['keywords'] = NluEnrichmentKeywords._from_dict(
_dict.get('keywords'))
if 'entities' in _dict:
args['entities... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'sentiment') and self.sentiment is not None:
_dict['sentiment'] = self.sentiment
if hasattr(self, 'emotion') and self.emotion is not None:
_dict['emotion'] = se... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'operation') and self.operation is not None:
_dict['operation'] = self.operation
if hasattr(self, 'source_field') and self.source_field is not None:
_dict['sour... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'notice_id') and self.notice_id is not None:
_dict['notice_id'] = self.notice_id
if hasattr(self, 'created') and self.created is not None:
_dict['created'] = da... |
Initialize a PdfHeadingDetection object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a PdfHeadingDetection object from a json dictionary."""
args = {}
if 'fonts' in _dict:
args['fonts'] = [
FontSetting._from_dict(x) for x in (_dict.get('fonts'))
]
return cls(**args) |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'fonts') and self.fonts is not None:
_dict['fonts'] = [x._to_dict() for x in self.fonts]
return _dict |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'heading') and self.heading is not None:
_dict['heading'] = self.heading._to_dict()
return _dict |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'type') and self.type is not None:
_dict['type'] = self.type
if hasattr(self, 'results') and self.results is not None:
_dict['results'] = [x._to_dict() for x in... |
Initialize a QueryEntitiesResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryEntitiesResponse object from a json dictionary."""
args = {}
if 'entities' in _dict:
args['entities'] = [
QueryEntitiesResponseItem._from_dict(x)
for x in (_dict.get('entities'))
]
re... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'entities') and self.entities is not None:
_dict['entities'] = [x._to_dict() for x in self.entities]
return _dict |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'type') and self.type is not None:
_dict['type'] = self.type
if hasattr(se... |
Initialize a QueryEvidence object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryEvidence object from a json dictionary."""
args = {}
if 'document_id' in _dict:
args['document_id'] = _dict.get('document_id')
if 'field' in _dict:
args['field'] = _dict.get('field')
if 'start_offset' in _di... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_id') and self.document_id is not None:
_dict['document_id'] = self.document_id
if hasattr(self, 'field') and self.field is not None:
_dict['field'] = ... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'type') and self.type is not None:
_dict['type'] = self.type
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(se... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'exclude') and self.exclude is not None:
_dict['exclude'] = self.exclude
if hasattr(self, 'include') and self.include is not None:
_dict['include'] = self.inclu... |
Initialize a QueryNoticesResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryNoticesResponse object from a json dictionary."""
args = {}
if 'matching_results' in _dict:
args['matching_results'] = _dict.get('matching_results')
if 'results' in _dict:
args['results'] = [
QueryNo... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'matching_results') and self.matching_results is not None:
_dict['matching_results'] = self.matching_results
if hasattr(self, 'results') and self.results... |
Initialize a QueryNoticesResult object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryNoticesResult object from a json dictionary."""
args = {}
xtra = _dict.copy()
if 'id' in _dict:
args['id'] = _dict.get('id')
del xtra['id']
if 'metadata' in _dict:
args['metadata'] = _dict.get('m... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'id') and self.id is not None:
_dict['id'] = self.id
if hasattr(self, 'metadata') and self.metadata is not None:
_dict['metadata'] = self.metadata
if ha... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_id') and self.document_id is not None:
_dict['document_id'] = self.document_id
if hasattr(self, 'passage_score') and self.passage_score is not None:
_... |
Initialize a QueryRelationsArgument object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryRelationsArgument object from a json dictionary."""
args = {}
if 'entities' in _dict:
args['entities'] = [
QueryEntitiesEntity._from_dict(x)
for x in (_dict.get('entities'))
]
return ... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'relation_types') and self.relation_types is not None:
_dict['relation_types'] = self.relation_types._to_dict()
if hasattr(self, 'entity_types') and self.entity_types is no... |
Initialize a QueryRelationsRelationship object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryRelationsRelationship object from a json dictionary."""
args = {}
if 'type' in _dict:
args['type'] = _dict.get('type')
if 'frequency' in _dict:
args['frequency'] = _dict.get('frequency')
if 'arguments' in _d... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'type') and self.type is not None:
_dict['type'] = self.type
if hasattr(self, 'frequency') and self.frequency is not None:
_dict['frequency'] = self.frequency
... |
Initialize a QueryRelationsResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryRelationsResponse object from a json dictionary."""
args = {}
if 'relations' in _dict:
args['relations'] = [
QueryRelationsRelationship._from_dict(x)
for x in (_dict.get('relations'))
]
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'relations') and self.relations is not None:
_dict['relations'] = [x._to_dict() for x in self.relations]
return _dict |
Initialize a QueryResponse object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryResponse object from a json dictionary."""
args = {}
if 'matching_results' in _dict:
args['matching_results'] = _dict.get('matching_results')
if 'results' in _dict:
args['results'] = [
QueryResult._f... |
Initialize a QueryResult object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a QueryResult object from a json dictionary."""
args = {}
xtra = _dict.copy()
if 'id' in _dict:
args['id'] = _dict.get('id')
del xtra['id']
if 'metadata' in _dict:
args['metadata'] = _dict.get('metadata... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'id') and self.id is not None:
_dict['id'] = self.id
if hasattr(self, 'metadata') and self.metadata is not None:
_dict['metadata'] = self.metadata
if ha... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'score') and self.score is not None:
_dict['score'] = self.score
if hasattr(self, 'confidence') and self.confidence is not None:
_dict['confidence'] = self.conf... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_retrieval_strategy'
) and self.document_retrieval_strategy is not None:
_dict[
'document_retrieval_strategy'] = self.document_retrieval_... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'scope') and self.scope is not None:
_dict['scope'] = self.scope
if hasattr(self, 'status') and self.status is not None:
_dict['status'] = self.status
i... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'enabled') and self.enabled is not None:
_dict['enabled'] = self.enabled
if hasattr(self, 'selector_tags') and self.selector_tags is not None:
_dict['selector_t... |
Initialize a Source object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a Source object from a json dictionary."""
args = {}
if 'type' in _dict:
args['type'] = _dict.get('type')
if 'credential_id' in _dict:
args['credential_id'] = _dict.get('credential_id')
if 'schedule' in _dict:
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'type') and self.type is not None:
_dict['type'] = self.type
if hasattr(self, 'credential_id') and self.credential_id is not None:
_dict['credential_id'] = self... |
Initialize a SourceOptions object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a SourceOptions object from a json dictionary."""
args = {}
if 'folders' in _dict:
args['folders'] = [
SourceOptionsFolder._from_dict(x)
for x in (_dict.get('folders'))
]
if 'objects' in _di... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'folders') and self.folders is not None:
_dict['folders'] = [x._to_dict() for x in self.folders]
if hasattr(self, 'objects') and self.objects is not None:
_dict... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
if hasattr(self, 'limit') and self.limit is not None:
_dict['limit'] = self.limit
return _d... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'owner_user_id') and self.owner_user_id is not None:
_dict['owner_user_id'] = self.owner_user_id
if hasattr(self, 'folder_id') and self.folder_id is not None:
_... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'site_collection_path'
) and self.site_collection_path is not None:
_dict['site_collection_path'] = self.site_collection_path
if hasattr(self, 'limit') an... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'url') and self.url is not None:
_dict['url'] = self.url
if hasattr(self, 'limit_to_starting_hosts'
) and self.limit_to_starting_hosts is not None:
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'enabled') and self.enabled is not None:
_dict['enabled'] = self.enabled
if hasattr(self, 'time_zone') and self.time_zone is not None:
_dict['time_zone'] = self... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'status') and self.status is not None:
_dict['status'] = self.status
if hasattr(self, 'last_updated') and self.last_updated is not None:
_dict['last_updated'] =... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'field') and self.field is not None:
_dict['field'] = self.field
if hasattr(self, 'count') and self.count is not None:
_dict['count'] = self.count
retur... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'field') and self.field is not None:
_dict['field'] = self.field
if hasattr(self, 'interval') and self.interval is not None:
_dict['interval'] = self.interval
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'tokens') and self.tokens is not None:
_dict['tokens'] = self.tokens
if ha... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'status') and self.status is not None:
_dict['status'] = self.status
if hasattr(self, 'type') and self.type is not None:
_dict['type'] = self.type
retur... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'size') and self.size is not None:
_dict['size'] = self.size
if hasattr(self, 'hits') and self.hits is not None:
_dict['hits'] = self.hits._to_dict()
re... |
Initialize a TopHitsResults object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a TopHitsResults object from a json dictionary."""
args = {}
if 'matching_results' in _dict:
args['matching_results'] = _dict.get('matching_results')
if 'hits' in _dict:
args['hits'] = [
QueryResult._from_d... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'matching_results') and self.matching_results is not None:
_dict['matching_results'] = self.matching_results
if hasattr(self, 'hits') and self.hits is no... |
Initialize a TrainingDataSet object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a TrainingDataSet object from a json dictionary."""
args = {}
if 'environment_id' in _dict:
args['environment_id'] = _dict.get('environment_id')
if 'collection_id' in _dict:
args['collection_id'] = _dict.get('collection_id... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'environment_id') and self.environment_id is not None:
_dict['environment_id'] = self.environment_id
if hasattr(self, 'collection_id') and self.collection_id is not None:
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_id') and self.document_id is not None:
_dict['document_id'] = self.document_id
if hasattr(self,
'cross_reference') and self.cross_reference is ... |
Initialize a TrainingExampleList object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a TrainingExampleList object from a json dictionary."""
args = {}
if 'examples' in _dict:
args['examples'] = [
TrainingExample._from_dict(x) for x in (_dict.get('examples'))
]
return cls(**args) |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'examples') and self.examples is not None:
_dict['examples'] = [x._to_dict() for x in self.examples]
return _dict |
Initialize a TrainingQuery object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a TrainingQuery object from a json dictionary."""
args = {}
if 'query_id' in _dict:
args['query_id'] = _dict.get('query_id')
if 'natural_language_query' in _dict:
args['natural_language_query'] = _dict.get('natural_languag... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'query_id') and self.query_id is not None:
_dict['query_id'] = self.query_id
if hasattr(self, 'natural_language_query'
) and self.natural_language_query i... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'total_examples') and self.total_examples is not None:
_dict['total_examples'] = self.total_examples
if hasattr(self, 'available') and self.available is not None:
... |
Initialize a WordHeadingDetection object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a WordHeadingDetection object from a json dictionary."""
args = {}
if 'fonts' in _dict:
args['fonts'] = [
FontSetting._from_dict(x) for x in (_dict.get('fonts'))
]
if 'styles' in _dict:
args['st... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'fonts') and self.fonts is not None:
_dict['fonts'] = [x._to_dict() for x in self.fonts]
if hasattr(self, 'styles') and self.styles is not None:
_dict['styles']... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'level') and self.level is not None:
_dict['level'] = self.level
if hasattr(self, 'names') and self.names is not None:
_dict['names'] = self.names
retur... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'xpaths') and self.xpaths is not None:
_dict['xpaths'] = self.xpaths
return _dict |
Analyze general tone. | def tone(self,
tone_input,
sentences=None,
tones=None,
content_language=None,
accept_language=None,
content_type=None,
**kwargs):
"""
Analyze general tone.
Use the general purpose endpoint to analyze the ... |
Analyze customer engagement tone. | def tone_chat(self,
utterances,
content_language=None,
accept_language=None,
**kwargs):
"""
Analyze customer engagement tone.
Use the customer engagement endpoint to analyze the tone of customer service and
customer... |
Initialize a DocumentAnalysis object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a DocumentAnalysis object from a json dictionary."""
args = {}
if 'tones' in _dict:
args['tones'] = [
ToneScore._from_dict(x) for x in (_dict.get('tones'))
]
if 'tone_categories' in _dict:
args[... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'tones') and self.tones is not None:
_dict['tones'] = [x._to_dict() for x in self.tones]
if hasattr(self,
'tone_categories') and self.tone_categories is ... |
Initialize a SentenceAnalysis object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a SentenceAnalysis object from a json dictionary."""
args = {}
if 'sentence_id' in _dict:
args['sentence_id'] = _dict.get('sentence_id')
else:
raise ValueError(
'Required property \'sentence_id\' not presen... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'sentence_id') and self.sentence_id is not None:
_dict['sentence_id'] = self.sentence_id
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = sel... |
Initialize a ToneAnalysis object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a ToneAnalysis object from a json dictionary."""
args = {}
if 'document_tone' in _dict:
args['document_tone'] = DocumentAnalysis._from_dict(
_dict.get('document_tone'))
else:
raise ValueError(
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_tone') and self.document_tone is not None:
_dict['document_tone'] = self.document_tone._to_dict()
if hasattr(self, 'sentences_tone') and self.sentences_tone is no... |
Initialize a ToneCategory object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a ToneCategory object from a json dictionary."""
args = {}
if 'tones' in _dict:
args['tones'] = [
ToneScore._from_dict(x) for x in (_dict.get('tones'))
]
else:
raise ValueError(
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'tones') and self.tones is not None:
_dict['tones'] = [x._to_dict() for x in self.tones]
if hasattr(self, 'category_id') and self.category_id is not None:
_dict... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'score') and self.score is not None:
_dict['score'] = self.score
if hasattr(self, 'tone_id') and self.tone_id is not None:
_dict['tone_id'] = self.tone_id
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'text') and self.text is not None:
_dict['text'] = self.text
if hasattr(self, 'user') and self.user is not None:
_dict['user'] = self.user
return _dict |
Initialize a UtteranceAnalyses object from a json dictionary. | def _from_dict(cls, _dict):
"""Initialize a UtteranceAnalyses object from a json dictionary."""
args = {}
if 'utterances_tone' in _dict:
args['utterances_tone'] = [
UtteranceAnalysis._from_dict(x)
for x in (_dict.get('utterances_tone'))
]
... |
Return a json dictionary representing this model. | def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'utterances_tone') and self.utterances_tone is not None:
_dict['utterances_tone'] = [
x._to_dict() for x in self.utterances_tone
]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.