def to_dict(self) -> Dict:
     """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, 'protocol') and self.protocol is not None:
         _dict['protocol'] = self.protocol
     if hasattr(self, 'dns') and self.dns is not None:
         _dict['dns'] = self.dns.to_dict()
     if hasattr(self, 'origin_direct') and self.origin_direct is not None:
         _dict['origin_direct'] = self.origin_direct
     if hasattr(self, 'ip_firewall') and self.ip_firewall is not None:
         _dict['ip_firewall'] = self.ip_firewall
     if hasattr(self, 'proxy_protocol') and self.proxy_protocol is not None:
         _dict['proxy_protocol'] = self.proxy_protocol
     if hasattr(self, 'edge_ips') and self.edge_ips is not None:
         _dict['edge_ips'] = self.edge_ips.to_dict()
     if hasattr(self, 'tls') and self.tls is not None:
         _dict['tls'] = self.tls
     if hasattr(self, 'traffic_type') and self.traffic_type is not None:
         _dict['traffic_type'] = self.traffic_type
     if hasattr(self, 'created_on') and self.created_on is not None:
         _dict['created_on'] = datetime_to_string(self.created_on)
     if hasattr(self, 'modified_on') and self.modified_on is not None:
         _dict['modified_on'] = datetime_to_string(self.modified_on)
     return _dict
 def to_dict(self) -> Dict:
     """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, 'crn') and self.crn is not None:
         _dict['crn'] = self.crn
     if hasattr(self, 'account_id') and self.account_id is not None:
         _dict['account_id'] = self.account_id
     if hasattr(self, 'name') and self.name is not None:
         _dict['name'] = self.name
     if hasattr(self, 'state') and self.state is not None:
         _dict['state'] = self.state
     if hasattr(self, 'default') and self.default is not None:
         _dict['default'] = self.default
     if hasattr(self, 'quota_id') and self.quota_id is not None:
         _dict['quota_id'] = self.quota_id
     if hasattr(self, 'quota_url') and self.quota_url is not None:
         _dict['quota_url'] = self.quota_url
     if hasattr(self, 'payment_methods_url'
                ) and self.payment_methods_url is not None:
         _dict['payment_methods_url'] = self.payment_methods_url
     if hasattr(self,
                'resource_linkages') and self.resource_linkages is not None:
         _dict['resource_linkages'] = self.resource_linkages
     if hasattr(self, 'teams_url') and self.teams_url is not None:
         _dict['teams_url'] = self.teams_url
     if hasattr(self, 'created_at') and self.created_at is not None:
         _dict['created_at'] = datetime_to_string(self.created_at)
     if hasattr(self, 'updated_at') and self.updated_at is not None:
         _dict['updated_at'] = datetime_to_string(self.updated_at)
     return _dict
Esempio n. 3
0
 def to_dict(self) -> Dict:
     """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, 'name') and self.name is not None:
         _dict['name'] = self.name
     if hasattr(self, 'type') and self.type is not None:
         _dict['type'] = self.type
     if hasattr(self, 'number_of_apps') and self.number_of_apps is not None:
         _dict['number_of_apps'] = self.number_of_apps
     if hasattr(self, 'number_of_service_instances') and self.number_of_service_instances is not None:
         _dict['number_of_service_instances'] = self.number_of_service_instances
     if hasattr(self, 'default_number_of_instances_per_lite_plan') and self.default_number_of_instances_per_lite_plan is not None:
         _dict['default_number_of_instances_per_lite_plan'] = self.default_number_of_instances_per_lite_plan
     if hasattr(self, 'instances_per_app') and self.instances_per_app is not None:
         _dict['instances_per_app'] = self.instances_per_app
     if hasattr(self, 'instance_memory') and self.instance_memory is not None:
         _dict['instance_memory'] = self.instance_memory
     if hasattr(self, 'total_app_memory') and self.total_app_memory is not None:
         _dict['total_app_memory'] = self.total_app_memory
     if hasattr(self, 'vsi_limit') and self.vsi_limit is not None:
         _dict['vsi_limit'] = self.vsi_limit
     if hasattr(self, 'resource_quotas') and self.resource_quotas is not None:
         _dict['resource_quotas'] = [x.to_dict() for x in self.resource_quotas]
     if hasattr(self, 'created_at') and self.created_at is not None:
         _dict['created_at'] = datetime_to_string(self.created_at)
     if hasattr(self, 'updated_at') and self.updated_at is not None:
         _dict['updated_at'] = datetime_to_string(self.updated_at)
     return _dict
Esempio n. 4
0
 def to_dict(self) -> Dict:
     """Return a json dictionary representing this model."""
     _dict = {}
     if hasattr(self,
                'billing_option_id') and self.billing_option_id is not None:
         _dict['billing_option_id'] = self.billing_option_id
     if hasattr(self, 'category') and self.category is not None:
         _dict['category'] = self.category
     if hasattr(self, 'start_date') and self.start_date is not None:
         _dict['start_date'] = datetime_to_string(self.start_date)
     if hasattr(self, 'end_date') and self.end_date is not None:
         _dict['end_date'] = datetime_to_string(self.end_date)
     if hasattr(self, 'total_credits') and self.total_credits is not None:
         _dict['total_credits'] = self.total_credits
     if hasattr(self,
                'starting_balance') and self.starting_balance is not None:
         _dict['starting_balance'] = self.starting_balance
     if hasattr(self, 'used_credits') and self.used_credits is not None:
         _dict['used_credits'] = self.used_credits
     if hasattr(self,
                'current_balance') and self.current_balance is not None:
         _dict['current_balance'] = self.current_balance
     if hasattr(self, 'resources') and self.resources is not None:
         _dict['resources'] = self.resources
     return _dict
 def to_dict(self) -> Dict:
     """Return a json dictionary representing this model."""
     _dict = {}
     if hasattr(self, 'application_details'
                ) and self.application_details is not None:
         _dict['application_details'] = self.application_details.to_dict()
     if hasattr(self, 'id') and self.id is not None:
         _dict['id'] = self.id
     if hasattr(self, 'state') and self.state is not None:
         _dict['state'] = self.state
     if hasattr(self, 'start_time') and self.start_time is not None:
         _dict['start_time'] = datetime_to_string(self.start_time)
     if hasattr(self, 'finish_time') and self.finish_time is not None:
         _dict['finish_time'] = datetime_to_string(self.finish_time)
     return _dict
Esempio n. 6
0
 def to_dict(self) -> Dict:
     """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, 'description') and self.description is not None:
         _dict['description'] = self.description
     if hasattr(self, 'required_tokens') and self.required_tokens is not None:
         _dict['required_tokens'] = self.required_tokens
     if hasattr(self, 'preview_target') and self.preview_target is not None:
         _dict['preview_target'] = self.preview_target
     if hasattr(self, 'created_on') and self.created_on is not None:
         _dict['created_on'] = datetime_to_string(self.created_on)
     if hasattr(self, 'modified_on') and self.modified_on is not None:
         _dict['modified_on'] = datetime_to_string(self.modified_on)
     if hasattr(self, 'url') and self.url is not None:
         _dict['url'] = self.url
     if hasattr(self, 'state') and self.state is not None:
         _dict['state'] = self.state
     return _dict
 def to_dict(self) -> Dict:
     """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, 'notes') and self.notes is not None:
         _dict['notes'] = self.notes
     if hasattr(self, 'allowed_modes') and self.allowed_modes is not None:
         _dict['allowed_modes'] = self.allowed_modes
     if hasattr(self, 'mode') and self.mode is not None:
         _dict['mode'] = self.mode
     if hasattr(self, 'scope') and self.scope is not None:
         _dict['scope'] = self.scope.to_dict()
     if hasattr(self, 'created_on') and self.created_on is not None:
         _dict['created_on'] = datetime_to_string(self.created_on)
     if hasattr(self, 'modified_on') and self.modified_on is not None:
         _dict['modified_on'] = datetime_to_string(self.modified_on)
     if hasattr(self, 'configuration') and self.configuration is not None:
         _dict['configuration'] = self.configuration.to_dict()
     return _dict
 def to_dict(self) -> Dict:
     """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, 'timestamp') and self.timestamp is not None:
         _dict['timestamp'] = datetime_to_string(self.timestamp)
     if hasattr(self, 'pool') and self.pool is not None:
         _dict['pool'] = [x.to_dict() for x in self.pool]
     if hasattr(self, 'origins') and self.origins is not None:
         _dict['origins'] = [x.to_dict() for x in self.origins]
     return _dict
Esempio n. 9
0
 def to_dict(self) -> Dict:
     """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, 'value') and self.value is not None:
         _dict['value'] = self.value
     if hasattr(self, 'editable') and self.editable is not None:
         _dict['editable'] = self.editable
     if hasattr(self, 'modified_on') and self.modified_on is not None:
         _dict['modified_on'] = datetime_to_string(self.modified_on)
     return _dict
Esempio n. 10
0
 def to_dict(self) -> Dict:
     """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,
                'billing_unit_id') and self.billing_unit_id is not None:
         _dict['billing_unit_id'] = self.billing_unit_id
     if hasattr(self, 'start_date') and self.start_date is not None:
         _dict['start_date'] = datetime_to_string(self.start_date)
     if hasattr(self, 'end_date') and self.end_date is not None:
         _dict['end_date'] = datetime_to_string(self.end_date)
     if hasattr(self, 'state') and self.state is not None:
         _dict['state'] = self.state
     if hasattr(self, 'type') and self.type is not None:
         _dict['type'] = self.type
     if hasattr(self, 'category') and self.category is not None:
         _dict['category'] = self.category
     if hasattr(
             self,
             'payment_instrument') and self.payment_instrument is not None:
         _dict['payment_instrument'] = self.payment_instrument
     if hasattr(
             self,
             'duration_in_months') and self.duration_in_months is not None:
         _dict['duration_in_months'] = self.duration_in_months
     if hasattr(self, 'line_item_id') and self.line_item_id is not None:
         _dict['line_item_id'] = self.line_item_id
     if hasattr(self, 'billing_system') and self.billing_system is not None:
         _dict['billing_system'] = self.billing_system
     if hasattr(self,
                'renewal_mode_code') and self.renewal_mode_code is not None:
         _dict['renewal_mode_code'] = self.renewal_mode_code
     if hasattr(self, 'updated_at') and self.updated_at is not None:
         _dict['updated_at'] = datetime_to_string(self.updated_at)
     return _dict
Esempio n. 11
0
 def to_dict(self) -> Dict:
     """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, 'crn') and self.crn is not None:
         _dict['crn'] = self.crn
     if hasattr(self, 'name') and self.name is not None:
         _dict['name'] = self.name
     if hasattr(self, 'enterprise_id') and self.enterprise_id is not None:
         _dict['enterprise_id'] = self.enterprise_id
     if hasattr(self, 'currency_code') and self.currency_code is not None:
         _dict['currency_code'] = self.currency_code
     if hasattr(self, 'country_code') and self.country_code is not None:
         _dict['country_code'] = self.country_code
     if hasattr(self, 'master') and self.master is not None:
         _dict['master'] = self.master
     if hasattr(self, 'created_at') and self.created_at is not None:
         _dict['created_at'] = datetime_to_string(self.created_at)
     return _dict
 def to_dict(self) -> Dict:
     """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, 'href') and self.href is not None:
         _dict['href'] = self.href
     if hasattr(self, 'state') and self.state is not None:
         _dict['state'] = self.state
     if hasattr(self,
                'state_change_time') and self.state_change_time is not None:
         _dict['state_change_time'] = datetime_to_string(
             self.state_change_time)
     if hasattr(self,
                'default_runtime') and self.default_runtime is not None:
         _dict['default_runtime'] = self.default_runtime.to_dict()
     if hasattr(self, 'instance_home') and self.instance_home is not None:
         _dict['instance_home'] = self.instance_home.to_dict()
     if hasattr(self, 'default_config') and self.default_config is not None:
         _dict['default_config'] = self.default_config.to_dict()
     return _dict
Esempio n. 13
0
 def to_dict(self) -> Dict:
     """Return a json dictionary representing this model."""
     _dict = {}
     if hasattr(self, 'ray_id') and self.ray_id is not None:
         _dict['ray_id'] = self.ray_id
     if hasattr(self, 'kind') and self.kind is not None:
         _dict['kind'] = self.kind
     if hasattr(self, 'source') and self.source is not None:
         _dict['source'] = self.source
     if hasattr(self, 'action') and self.action is not None:
         _dict['action'] = self.action
     if hasattr(self, 'rule_id') and self.rule_id is not None:
         _dict['rule_id'] = self.rule_id
     if hasattr(self, 'ip') and self.ip is not None:
         _dict['ip'] = self.ip
     if hasattr(self, 'ip_class') and self.ip_class is not None:
         _dict['ip_class'] = self.ip_class
     if hasattr(self, 'country') and self.country is not None:
         _dict['country'] = self.country
     if hasattr(self, 'colo') and self.colo is not None:
         _dict['colo'] = self.colo
     if hasattr(self, 'host') and self.host is not None:
         _dict['host'] = self.host
     if hasattr(self, 'method') and self.method is not None:
         _dict['method'] = self.method
     if hasattr(self, 'proto') and self.proto is not None:
         _dict['proto'] = self.proto
     if hasattr(self, 'scheme') and self.scheme is not None:
         _dict['scheme'] = self.scheme
     if hasattr(self, 'ua') and self.ua is not None:
         _dict['ua'] = self.ua
     if hasattr(self, 'uri') and self.uri is not None:
         _dict['uri'] = self.uri
     if hasattr(self, 'occurred_at') and self.occurred_at is not None:
         _dict['occurred_at'] = datetime_to_string(self.occurred_at)
     if hasattr(self, 'matches') and self.matches is not None:
         _dict['matches'] = [x.to_dict() for x in self.matches]
     return _dict