From 289d0dec0c412554ef2bd9ddac1178d5e2f26162 Mon Sep 17 00:00:00 2001 From: alexey Date: Mon, 4 Mar 2024 16:37:59 +0300 Subject: [PATCH] Codegen: CrmObjects --- hubspot/crm/products/__init__.py | 2 + hubspot/crm/products/api/__init__.py | 1 + hubspot/crm/products/api/gdpr_api.py | 160 ++++++++ hubspot/crm/products/models/__init__.py | 1 + ...atch_read_input_simple_public_object_id.py | 56 +-- .../batch_response_simple_public_object.py | 142 +++---- ...sponse_simple_public_object_with_errors.py | 202 +++++----- .../collection_response_associated_id.py | 52 +-- ...object_with_associations_forward_paging.py | 52 +-- ...tal_simple_public_object_forward_paging.py | 52 +-- hubspot/crm/products/models/error.py | 190 +++++----- hubspot/crm/products/models/error_category.py | 213 ----------- hubspot/crm/products/models/error_detail.py | 120 +++--- hubspot/crm/products/models/filter.py | 80 ++-- hubspot/crm/products/models/next_page.py | 52 +-- .../models/public_associations_for_object.py | 56 +-- .../models/public_gdpr_delete_input.py | 146 ++++++++ .../crm/products/models/public_merge_input.py | 56 +-- .../models/public_object_search_request.py | 158 ++++---- .../products/models/simple_public_object.py | 197 +++++----- .../simple_public_object_batch_input.py | 64 ++-- .../models/simple_public_object_input.py | 7 +- .../simple_public_object_input_for_create.py | 62 ++-- .../simple_public_object_with_associations.py | 228 ++++++------ hubspot/crm/products/models/standard_error.py | 170 ++++----- .../products/models/value_with_timestamp.py | 130 +++---- hubspot/crm/quotes/__init__.py | 2 + hubspot/crm/quotes/api/__init__.py | 1 + hubspot/crm/quotes/api/gdpr_api.py | 160 ++++++++ hubspot/crm/quotes/models/__init__.py | 1 + ...atch_read_input_simple_public_object_id.py | 56 +-- .../batch_response_simple_public_object.py | 142 +++---- ...sponse_simple_public_object_with_errors.py | 202 +++++----- .../collection_response_associated_id.py | 52 +-- ...object_with_associations_forward_paging.py | 52 +-- ...tal_simple_public_object_forward_paging.py | 52 +-- hubspot/crm/quotes/models/error.py | 190 +++++----- hubspot/crm/quotes/models/error_category.py | 213 ----------- hubspot/crm/quotes/models/error_detail.py | 120 +++--- hubspot/crm/quotes/models/filter.py | 80 ++-- hubspot/crm/quotes/models/next_page.py | 52 +-- .../models/public_associations_for_object.py | 56 +-- .../quotes/models/public_gdpr_delete_input.py | 146 ++++++++ .../crm/quotes/models/public_merge_input.py | 56 +-- .../models/public_object_search_request.py | 158 ++++---- .../crm/quotes/models/simple_public_object.py | 198 +++++----- .../simple_public_object_batch_input.py | 60 ++- .../simple_public_object_input_for_create.py | 56 +-- .../simple_public_object_with_associations.py | 228 ++++++------ hubspot/crm/quotes/models/standard_error.py | 170 ++++----- .../crm/quotes/models/value_with_timestamp.py | 130 +++---- hubspot/crm/tickets/__init__.py | 2 + hubspot/crm/tickets/api/__init__.py | 1 + hubspot/crm/tickets/api/gdpr_api.py | 160 ++++++++ hubspot/crm/tickets/models/__init__.py | 1 + ...atch_read_input_simple_public_object_id.py | 56 +-- .../batch_response_simple_public_object.py | 142 +++---- ...sponse_simple_public_object_with_errors.py | 202 +++++----- .../collection_response_associated_id.py | 52 +-- ...object_with_associations_forward_paging.py | 52 +-- ...tal_simple_public_object_forward_paging.py | 52 +-- hubspot/crm/tickets/models/error.py | 190 +++++----- hubspot/crm/tickets/models/error_category.py | 213 ----------- hubspot/crm/tickets/models/error_detail.py | 120 +++--- hubspot/crm/tickets/models/filter.py | 80 ++-- hubspot/crm/tickets/models/next_page.py | 52 +-- .../models/public_associations_for_object.py | 56 +-- .../models/public_gdpr_delete_input.py | 146 ++++++++ .../crm/tickets/models/public_merge_input.py | 56 +-- .../models/public_object_search_request.py | 158 ++++---- .../tickets/models/simple_public_object.py | 198 +++++----- .../simple_public_object_batch_input.py | 60 ++- .../simple_public_object_input_for_create.py | 56 +-- .../simple_public_object_with_associations.py | 228 ++++++------ hubspot/crm/tickets/models/standard_error.py | 170 ++++----- .../tickets/models/value_with_timestamp.py | 130 +++---- hubspot/crm/timeline/__init__.py | 3 +- hubspot/crm/timeline/api/events_api.py | 11 +- hubspot/crm/timeline/api/templates_api.py | 2 +- hubspot/crm/timeline/api/tokens_api.py | 2 +- hubspot/crm/timeline/api_client.py | 2 +- hubspot/crm/timeline/configuration.py | 2 +- hubspot/crm/timeline/exceptions.py | 2 +- hubspot/crm/timeline/models/__init__.py | 3 +- .../models/batch_input_timeline_event.py | 2 +- .../batch_response_timeline_event_response.py | 156 ++++---- ...nse_timeline_event_response_with_errors.py | 204 +++++------ ...ponse_timeline_event_template_no_paging.py | 2 +- hubspot/crm/timeline/models/error.py | 192 +++++----- hubspot/crm/timeline/models/error_category.py | 213 ----------- hubspot/crm/timeline/models/error_detail.py | 122 +++--- hubspot/crm/timeline/models/event_detail.py | 2 +- hubspot/crm/timeline/models/standard_error.py | 178 ++++----- hubspot/crm/timeline/models/timeline_event.py | 278 +++++++------- .../timeline/models/timeline_event_i_frame.py | 62 ++-- .../models/timeline_event_response.py | 346 +++++++++--------- .../models/timeline_event_template.py | 154 ++++---- .../timeline_event_template_create_request.py | 110 +++--- .../models/timeline_event_template_token.py | 151 ++++---- .../timeline_event_template_token_option.py | 58 +-- ...ine_event_template_token_update_request.py | 61 ++- .../timeline_event_template_update_request.py | 110 +++--- hubspot/crm/timeline/rest.py | 2 +- 103 files changed, 5243 insertions(+), 5102 deletions(-) create mode 100644 hubspot/crm/products/api/gdpr_api.py delete mode 100644 hubspot/crm/products/models/error_category.py create mode 100644 hubspot/crm/products/models/public_gdpr_delete_input.py create mode 100644 hubspot/crm/quotes/api/gdpr_api.py delete mode 100644 hubspot/crm/quotes/models/error_category.py create mode 100644 hubspot/crm/quotes/models/public_gdpr_delete_input.py create mode 100644 hubspot/crm/tickets/api/gdpr_api.py delete mode 100644 hubspot/crm/tickets/models/error_category.py create mode 100644 hubspot/crm/tickets/models/public_gdpr_delete_input.py delete mode 100644 hubspot/crm/timeline/models/error_category.py diff --git a/hubspot/crm/products/__init__.py b/hubspot/crm/products/__init__.py index f016dbc1..189d028d 100644 --- a/hubspot/crm/products/__init__.py +++ b/hubspot/crm/products/__init__.py @@ -19,6 +19,7 @@ # import apis into sdk package from hubspot.crm.products.api.basic_api import BasicApi from hubspot.crm.products.api.batch_api import BatchApi +from hubspot.crm.products.api.gdpr_api import GDPRApi from hubspot.crm.products.api.public_object_api import PublicObjectApi from hubspot.crm.products.api.search_api import SearchApi @@ -53,6 +54,7 @@ from hubspot.crm.products.models.paging import Paging from hubspot.crm.products.models.previous_page import PreviousPage from hubspot.crm.products.models.public_associations_for_object import PublicAssociationsForObject +from hubspot.crm.products.models.public_gdpr_delete_input import PublicGdprDeleteInput from hubspot.crm.products.models.public_merge_input import PublicMergeInput from hubspot.crm.products.models.public_object_id import PublicObjectId from hubspot.crm.products.models.public_object_search_request import PublicObjectSearchRequest diff --git a/hubspot/crm/products/api/__init__.py b/hubspot/crm/products/api/__init__.py index 328f11ef..290db88c 100644 --- a/hubspot/crm/products/api/__init__.py +++ b/hubspot/crm/products/api/__init__.py @@ -5,5 +5,6 @@ # import apis into api package from hubspot.crm.products.api.basic_api import BasicApi from hubspot.crm.products.api.batch_api import BatchApi +from hubspot.crm.products.api.gdpr_api import GDPRApi from hubspot.crm.products.api.public_object_api import PublicObjectApi from hubspot.crm.products.api.search_api import SearchApi diff --git a/hubspot/crm/products/api/gdpr_api.py b/hubspot/crm/products/api/gdpr_api.py new file mode 100644 index 00000000..95073395 --- /dev/null +++ b/hubspot/crm/products/api/gdpr_api.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Products + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v3 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from hubspot.crm.products.api_client import ApiClient +from hubspot.crm.products.exceptions import ApiTypeError, ApiValueError # noqa: F401 + + +class GDPRApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def purge(self, public_gdpr_delete_input, **kwargs): # noqa: E501 + """GDPR DELETE # noqa: E501 + + Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.purge(public_gdpr_delete_input, async_req=True) + >>> result = thread.get() + + :param public_gdpr_delete_input: (required) + :type public_gdpr_delete_input: PublicGdprDeleteInput + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs["_return_http_data_only"] = True + return self.purge_with_http_info(public_gdpr_delete_input, **kwargs) # noqa: E501 + + def purge_with_http_info(self, public_gdpr_delete_input, **kwargs): # noqa: E501 + """GDPR DELETE # noqa: E501 + + Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.purge_with_http_info(public_gdpr_delete_input, async_req=True) + >>> result = thread.get() + + :param public_gdpr_delete_input: (required) + :type public_gdpr_delete_input: PublicGdprDeleteInput + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + local_var_params = locals() + + all_params = ["public_gdpr_delete_input"] + all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"]) + + for key, val in six.iteritems(local_var_params["kwargs"]): + if key not in all_params: + raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method purge" % key) + local_var_params[key] = val + del local_var_params["kwargs"] + # verify the required parameter 'public_gdpr_delete_input' is set + if self.api_client.client_side_validation and local_var_params.get("public_gdpr_delete_input") is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `public_gdpr_delete_input` when calling `purge`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get("_headers", {})) + + form_params = [] + local_var_files = {} + + body_params = None + if "public_gdpr_delete_input" in local_var_params: + body_params = local_var_params["public_gdpr_delete_input"] + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "POST", body_params)) # noqa: E501 + if content_types_list: + header_params["Content-Type"] = content_types_list + + # Authentication setting + auth_settings = ["oauth2"] # noqa: E501 + + response_types_map = {} + + return self.api_client.call_api( + "/crm/v3/objects/products/gdpr-delete", + "POST", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get("async_req"), + _return_http_data_only=local_var_params.get("_return_http_data_only"), # noqa: E501 + _preload_content=local_var_params.get("_preload_content", True), + _request_timeout=local_var_params.get("_request_timeout"), + collection_formats=collection_formats, + _request_auth=local_var_params.get("_request_auth"), + ) diff --git a/hubspot/crm/products/models/__init__.py b/hubspot/crm/products/models/__init__.py index af6874d9..392678de 100644 --- a/hubspot/crm/products/models/__init__.py +++ b/hubspot/crm/products/models/__init__.py @@ -34,6 +34,7 @@ from hubspot.crm.products.models.paging import Paging from hubspot.crm.products.models.previous_page import PreviousPage from hubspot.crm.products.models.public_associations_for_object import PublicAssociationsForObject +from hubspot.crm.products.models.public_gdpr_delete_input import PublicGdprDeleteInput from hubspot.crm.products.models.public_merge_input import PublicMergeInput from hubspot.crm.products.models.public_object_id import PublicObjectId from hubspot.crm.products.models.public_object_search_request import PublicObjectSearchRequest diff --git a/hubspot/crm/products/models/batch_read_input_simple_public_object_id.py b/hubspot/crm/products/models/batch_read_input_simple_public_object_id.py index 4ef1a5d5..079025a6 100644 --- a/hubspot/crm/products/models/batch_read_input_simple_public_object_id.py +++ b/hubspot/crm/products/models/batch_read_input_simple_public_object_id.py @@ -35,50 +35,27 @@ class BatchReadInputSimplePublicObjectId(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "list[str]", "properties_with_history": "list[str]", "id_property": "str", "inputs": "list[SimplePublicObjectId]"} + openapi_types = {"properties_with_history": "list[str]", "id_property": "str", "inputs": "list[SimplePublicObjectId]", "properties": "list[str]"} - attribute_map = {"properties": "properties", "properties_with_history": "propertiesWithHistory", "id_property": "idProperty", "inputs": "inputs"} + attribute_map = {"properties_with_history": "propertiesWithHistory", "id_property": "idProperty", "inputs": "inputs", "properties": "properties"} - def __init__(self, properties=None, properties_with_history=None, id_property=None, inputs=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, properties_with_history=None, id_property=None, inputs=None, properties=None, local_vars_configuration=None): # noqa: E501 """BatchReadInputSimplePublicObjectId - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None self._properties_with_history = None self._id_property = None self._inputs = None + self._properties = None self.discriminator = None - self.properties = properties self.properties_with_history = properties_with_history if id_property is not None: self.id_property = id_property self.inputs = inputs - - @property - def properties(self): - """Gets the properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - - - :return: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - :rtype: list[str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this BatchReadInputSimplePublicObjectId. - - - :param properties: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - :type properties: list[str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + self.properties = properties @property def properties_with_history(self): @@ -147,6 +124,29 @@ def inputs(self, inputs): self._inputs = inputs + @property + def properties(self): + """Gets the properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + + + :return: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + :rtype: list[str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this BatchReadInputSimplePublicObjectId. + + + :param properties: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + :type properties: list[str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/batch_response_simple_public_object.py b/hubspot/crm/products/models/batch_response_simple_public_object.py index 35a80483..92f83a86 100644 --- a/hubspot/crm/products/models/batch_response_simple_public_object.py +++ b/hubspot/crm/products/models/batch_response_simple_public_object.py @@ -35,81 +35,55 @@ class BatchResponseSimplePublicObject(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"status": "str", "results": "list[SimplePublicObject]", "requested_at": "datetime", "started_at": "datetime", "completed_at": "datetime", "links": "dict[str, str]"} + openapi_types = {"completed_at": "datetime", "requested_at": "datetime", "started_at": "datetime", "links": "dict[str, str]", "results": "list[SimplePublicObject]", "status": "str"} - attribute_map = {"status": "status", "results": "results", "requested_at": "requestedAt", "started_at": "startedAt", "completed_at": "completedAt", "links": "links"} + attribute_map = {"completed_at": "completedAt", "requested_at": "requestedAt", "started_at": "startedAt", "links": "links", "results": "results", "status": "status"} - def __init__(self, status=None, results=None, requested_at=None, started_at=None, completed_at=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, requested_at=None, started_at=None, links=None, results=None, status=None, local_vars_configuration=None): # noqa: E501 """BatchResponseSimplePublicObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None - self._results = None + self._completed_at = None self._requested_at = None self._started_at = None - self._completed_at = None self._links = None + self._results = None + self._status = None self.discriminator = None - self.status = status - self.results = results + self.completed_at = completed_at if requested_at is not None: self.requested_at = requested_at self.started_at = started_at - self.completed_at = completed_at if links is not None: self.links = links + self.results = results + self.status = status @property - def status(self): - """Gets the status of this BatchResponseSimplePublicObject. # noqa: E501 - - - :return: The status of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchResponseSimplePublicObject. - - - :param status: The status of this BatchResponseSimplePublicObject. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 - - self._status = status - - @property - def results(self): - """Gets the results of this BatchResponseSimplePublicObject. # noqa: E501 + def completed_at(self): + """Gets the completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :return: The results of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: list[SimplePublicObject] + :return: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: datetime """ - return self._results + return self._completed_at - @results.setter - def results(self, results): - """Sets the results of this BatchResponseSimplePublicObject. + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this BatchResponseSimplePublicObject. - :param results: The results of this BatchResponseSimplePublicObject. # noqa: E501 - :type results: list[SimplePublicObject] + :param completed_at: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 + :type completed_at: datetime """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 + raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - self._results = results + self._completed_at = completed_at @property def requested_at(self): @@ -155,29 +129,6 @@ def started_at(self, started_at): self._started_at = started_at - @property - def completed_at(self): - """Gets the completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - - - :return: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: datetime - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this BatchResponseSimplePublicObject. - - - :param completed_at: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :type completed_at: datetime - """ - if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 - raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - - self._completed_at = completed_at - @property def links(self): """Gets the links of this BatchResponseSimplePublicObject. # noqa: E501 @@ -199,6 +150,55 @@ def links(self, links): self._links = links + @property + def results(self): + """Gets the results of this BatchResponseSimplePublicObject. # noqa: E501 + + + :return: The results of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: list[SimplePublicObject] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchResponseSimplePublicObject. + + + :param results: The results of this BatchResponseSimplePublicObject. # noqa: E501 + :type results: list[SimplePublicObject] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + @property + def status(self): + """Gets the status of this BatchResponseSimplePublicObject. # noqa: E501 + + + :return: The status of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchResponseSimplePublicObject. + + + :param status: The status of this BatchResponseSimplePublicObject. # noqa: E501 + :type status: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 + + self._status = status + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/batch_response_simple_public_object_with_errors.py b/hubspot/crm/products/models/batch_response_simple_public_object_with_errors.py index 634db33e..8294dc8c 100644 --- a/hubspot/crm/products/models/batch_response_simple_public_object_with_errors.py +++ b/hubspot/crm/products/models/batch_response_simple_public_object_with_errors.py @@ -36,104 +36,78 @@ class BatchResponseSimplePublicObjectWithErrors(object): and the value is json key in definition. """ openapi_types = { - "status": "str", - "results": "list[SimplePublicObject]", + "completed_at": "datetime", "num_errors": "int", - "errors": "list[StandardError]", "requested_at": "datetime", "started_at": "datetime", - "completed_at": "datetime", "links": "dict[str, str]", + "results": "list[SimplePublicObject]", + "errors": "list[StandardError]", + "status": "str", } attribute_map = { - "status": "status", - "results": "results", + "completed_at": "completedAt", "num_errors": "numErrors", - "errors": "errors", "requested_at": "requestedAt", "started_at": "startedAt", - "completed_at": "completedAt", "links": "links", + "results": "results", + "errors": "errors", + "status": "status", } - def __init__(self, status=None, results=None, num_errors=None, errors=None, requested_at=None, started_at=None, completed_at=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, num_errors=None, requested_at=None, started_at=None, links=None, results=None, errors=None, status=None, local_vars_configuration=None): # noqa: E501 """BatchResponseSimplePublicObjectWithErrors - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None - self._results = None + self._completed_at = None self._num_errors = None - self._errors = None self._requested_at = None self._started_at = None - self._completed_at = None self._links = None + self._results = None + self._errors = None + self._status = None self.discriminator = None - self.status = status - self.results = results + self.completed_at = completed_at if num_errors is not None: self.num_errors = num_errors - if errors is not None: - self.errors = errors if requested_at is not None: self.requested_at = requested_at self.started_at = started_at - self.completed_at = completed_at if links is not None: self.links = links + self.results = results + if errors is not None: + self.errors = errors + self.status = status @property - def status(self): - """Gets the status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchResponseSimplePublicObjectWithErrors. - - - :param status: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 - - self._status = status - - @property - def results(self): - """Gets the results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + def completed_at(self): + """Gets the completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :return: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: list[SimplePublicObject] + :return: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: datetime """ - return self._results + return self._completed_at - @results.setter - def results(self, results): - """Sets the results of this BatchResponseSimplePublicObjectWithErrors. + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this BatchResponseSimplePublicObjectWithErrors. - :param results: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type results: list[SimplePublicObject] + :param completed_at: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type completed_at: datetime """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 + raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - self._results = results + self._completed_at = completed_at @property def num_errors(self): @@ -156,27 +130,6 @@ def num_errors(self, num_errors): self._num_errors = num_errors - @property - def errors(self): - """Gets the errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: list[StandardError] - """ - return self._errors - - @errors.setter - def errors(self, errors): - """Sets the errors of this BatchResponseSimplePublicObjectWithErrors. - - - :param errors: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type errors: list[StandardError] - """ - - self._errors = errors - @property def requested_at(self): """Gets the requested_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 @@ -221,29 +174,6 @@ def started_at(self, started_at): self._started_at = started_at - @property - def completed_at(self): - """Gets the completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: datetime - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this BatchResponseSimplePublicObjectWithErrors. - - - :param completed_at: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type completed_at: datetime - """ - if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 - raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - - self._completed_at = completed_at - @property def links(self): """Gets the links of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 @@ -265,6 +195,76 @@ def links(self, links): self._links = links + @property + def results(self): + """Gets the results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: list[SimplePublicObject] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchResponseSimplePublicObjectWithErrors. + + + :param results: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type results: list[SimplePublicObject] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + @property + def errors(self): + """Gets the errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: list[StandardError] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this BatchResponseSimplePublicObjectWithErrors. + + + :param errors: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type errors: list[StandardError] + """ + + self._errors = errors + + @property + def status(self): + """Gets the status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchResponseSimplePublicObjectWithErrors. + + + :param status: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type status: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 + + self._status = status + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/collection_response_associated_id.py b/hubspot/crm/products/models/collection_response_associated_id.py index 8f0d9e14..68bbb574 100644 --- a/hubspot/crm/products/models/collection_response_associated_id.py +++ b/hubspot/crm/products/models/collection_response_associated_id.py @@ -35,23 +35,44 @@ class CollectionResponseAssociatedId(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"results": "list[AssociatedId]", "paging": "Paging"} + openapi_types = {"paging": "Paging", "results": "list[AssociatedId]"} - attribute_map = {"results": "results", "paging": "paging"} + attribute_map = {"paging": "paging", "results": "results"} - def __init__(self, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseAssociatedId - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._results = None self._paging = None + self._results = None self.discriminator = None - self.results = results if paging is not None: self.paging = paging + self.results = results + + @property + def paging(self): + """Gets the paging of this CollectionResponseAssociatedId. # noqa: E501 + + + :return: The paging of this CollectionResponseAssociatedId. # noqa: E501 + :rtype: Paging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseAssociatedId. + + + :param paging: The paging of this CollectionResponseAssociatedId. # noqa: E501 + :type paging: Paging + """ + + self._paging = paging @property def results(self): @@ -76,27 +97,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseAssociatedId. # noqa: E501 - - - :return: The paging of this CollectionResponseAssociatedId. # noqa: E501 - :rtype: Paging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseAssociatedId. - - - :param paging: The paging of this CollectionResponseAssociatedId. # noqa: E501 - :type paging: Paging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/collection_response_simple_public_object_with_associations_forward_paging.py b/hubspot/crm/products/models/collection_response_simple_public_object_with_associations_forward_paging.py index 3069654b..a0e918b6 100644 --- a/hubspot/crm/products/models/collection_response_simple_public_object_with_associations_forward_paging.py +++ b/hubspot/crm/products/models/collection_response_simple_public_object_with_associations_forward_paging.py @@ -35,23 +35,44 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"results": "list[SimplePublicObjectWithAssociations]", "paging": "ForwardPaging"} + openapi_types = {"paging": "ForwardPaging", "results": "list[SimplePublicObjectWithAssociations]"} - attribute_map = {"results": "results", "paging": "paging"} + attribute_map = {"paging": "paging", "results": "results"} - def __init__(self, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseSimplePublicObjectWithAssociationsForwardPaging - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._results = None self._paging = None + self._results = None self.discriminator = None - self.results = results if paging is not None: self.paging = paging + self.results = results + + @property + def paging(self): + """Gets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + + + :return: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + :rtype: ForwardPaging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. + + + :param paging: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + :type paging: ForwardPaging + """ + + self._paging = paging @property def results(self): @@ -76,27 +97,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - - - :return: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - :rtype: ForwardPaging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. - - - :param paging: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - :type paging: ForwardPaging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/collection_response_with_total_simple_public_object_forward_paging.py b/hubspot/crm/products/models/collection_response_with_total_simple_public_object_forward_paging.py index 52d83c90..ee74941b 100644 --- a/hubspot/crm/products/models/collection_response_with_total_simple_public_object_forward_paging.py +++ b/hubspot/crm/products/models/collection_response_with_total_simple_public_object_forward_paging.py @@ -35,25 +35,25 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"total": "int", "results": "list[SimplePublicObject]", "paging": "ForwardPaging"} + openapi_types = {"total": "int", "paging": "ForwardPaging", "results": "list[SimplePublicObject]"} - attribute_map = {"total": "total", "results": "results", "paging": "paging"} + attribute_map = {"total": "total", "paging": "paging", "results": "results"} - def __init__(self, total=None, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, total=None, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseWithTotalSimplePublicObjectForwardPaging - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._total = None - self._results = None self._paging = None + self._results = None self.discriminator = None self.total = total - self.results = results if paging is not None: self.paging = paging + self.results = results @property def total(self): @@ -78,6 +78,27 @@ def total(self, total): self._total = total + @property + def paging(self): + """Gets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + + + :return: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + :rtype: ForwardPaging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. + + + :param paging: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + :type paging: ForwardPaging + """ + + self._paging = paging + @property def results(self): """Gets the results of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 @@ -101,27 +122,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - - - :return: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - :rtype: ForwardPaging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. - - - :param paging: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - :type paging: ForwardPaging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/error.py b/hubspot/crm/products/models/error.py index bb82dbc4..b5b48fcb 100644 --- a/hubspot/crm/products/models/error.py +++ b/hubspot/crm/products/models/error.py @@ -35,61 +35,82 @@ class Error(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"message": "str", "correlation_id": "str", "category": "str", "sub_category": "str", "errors": "list[ErrorDetail]", "context": "dict[str, list[str]]", "links": "dict[str, str]"} + openapi_types = {"sub_category": "str", "context": "dict[str, list[str]]", "correlation_id": "str", "links": "dict[str, str]", "message": "str", "category": "str", "errors": "list[ErrorDetail]"} - attribute_map = {"message": "message", "correlation_id": "correlationId", "category": "category", "sub_category": "subCategory", "errors": "errors", "context": "context", "links": "links"} + attribute_map = {"sub_category": "subCategory", "context": "context", "correlation_id": "correlationId", "links": "links", "message": "message", "category": "category", "errors": "errors"} - def __init__(self, message=None, correlation_id=None, category=None, sub_category=None, errors=None, context=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, context=None, correlation_id=None, links=None, message=None, category=None, errors=None, local_vars_configuration=None): # noqa: E501 """Error - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._message = None - self._correlation_id = None - self._category = None self._sub_category = None - self._errors = None self._context = None + self._correlation_id = None self._links = None + self._message = None + self._category = None + self._errors = None self.discriminator = None - self.message = message - self.correlation_id = correlation_id - self.category = category if sub_category is not None: self.sub_category = sub_category - if errors is not None: - self.errors = errors if context is not None: self.context = context + self.correlation_id = correlation_id if links is not None: self.links = links + self.message = message + self.category = category + if errors is not None: + self.errors = errors @property - def message(self): - """Gets the message of this Error. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this Error. # noqa: E501 - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The message of this Error. # noqa: E501 + :return: The sub_category of this Error. # noqa: E501 :rtype: str """ - return self._message + return self._sub_category - @message.setter - def message(self, message): - """Sets the message of this Error. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this Error. - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param message: The message of this Error. # noqa: E501 - :type message: str + :param sub_category: The sub_category of this Error. # noqa: E501 + :type sub_category: str """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - self._message = message + self._sub_category = sub_category + + @property + def context(self): + """Gets the context of this Error. # noqa: E501 + + Context about the error condition # noqa: E501 + + :return: The context of this Error. # noqa: E501 + :rtype: dict[str, list[str]] + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this Error. + + Context about the error condition # noqa: E501 + + :param context: The context of this Error. # noqa: E501 + :type context: dict[str, list[str]] + """ + + self._context = context @property def correlation_id(self): @@ -116,6 +137,54 @@ def correlation_id(self, correlation_id): self._correlation_id = correlation_id + @property + def links(self): + """Gets the links of this Error. # noqa: E501 + + A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 + + :return: The links of this Error. # noqa: E501 + :rtype: dict[str, str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this Error. + + A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 + + :param links: The links of this Error. # noqa: E501 + :type links: dict[str, str] + """ + + self._links = links + + @property + def message(self): + """Gets the message of this Error. # noqa: E501 + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :return: The message of this Error. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Error. + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :param message: The message of this Error. # noqa: E501 + :type message: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + @property def category(self): """Gets the category of this Error. # noqa: E501 @@ -141,29 +210,6 @@ def category(self, category): self._category = category - @property - def sub_category(self): - """Gets the sub_category of this Error. # noqa: E501 - - A specific category that contains more specific detail about the error # noqa: E501 - - :return: The sub_category of this Error. # noqa: E501 - :rtype: str - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this Error. - - A specific category that contains more specific detail about the error # noqa: E501 - - :param sub_category: The sub_category of this Error. # noqa: E501 - :type sub_category: str - """ - - self._sub_category = sub_category - @property def errors(self): """Gets the errors of this Error. # noqa: E501 @@ -187,52 +233,6 @@ def errors(self, errors): self._errors = errors - @property - def context(self): - """Gets the context of this Error. # noqa: E501 - - Context about the error condition # noqa: E501 - - :return: The context of this Error. # noqa: E501 - :rtype: dict[str, list[str]] - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this Error. - - Context about the error condition # noqa: E501 - - :param context: The context of this Error. # noqa: E501 - :type context: dict[str, list[str]] - """ - - self._context = context - - @property - def links(self): - """Gets the links of this Error. # noqa: E501 - - A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 - - :return: The links of this Error. # noqa: E501 - :rtype: dict[str, str] - """ - return self._links - - @links.setter - def links(self, links): - """Sets the links of this Error. - - A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 - - :param links: The links of this Error. # noqa: E501 - :type links: dict[str, str] - """ - - self._links = links - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/error_category.py b/hubspot/crm/products/models/error_category.py deleted file mode 100644 index bb9910ce..00000000 --- a/hubspot/crm/products/models/error_category.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Products - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from hubspot.crm.products.configuration import Configuration - - -class ErrorCategory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = {"name": "str", "http_status": "str"} - - attribute_map = {"name": "name", "http_status": "httpStatus"} - - def __init__(self, name=None, http_status=None, local_vars_configuration=None): # noqa: E501 - """ErrorCategory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._http_status = None - self.discriminator = None - - self.name = name - self.http_status = http_status - - @property - def name(self): - """Gets the name of this ErrorCategory. # noqa: E501 - - - :return: The name of this ErrorCategory. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ErrorCategory. - - - :param name: The name of this ErrorCategory. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def http_status(self): - """Gets the http_status of this ErrorCategory. # noqa: E501 - - - :return: The http_status of this ErrorCategory. # noqa: E501 - :rtype: str - """ - return self._http_status - - @http_status.setter - def http_status(self, http_status): - """Sets the http_status of this ErrorCategory. - - - :param http_status: The http_status of this ErrorCategory. # noqa: E501 - :type http_status: str - """ - if self.local_vars_configuration.client_side_validation and http_status is None: # noqa: E501 - raise ValueError("Invalid value for `http_status`, must not be `None`") # noqa: E501 - allowed_values = [ - "CONTINUE", - "SWITCHING_PROTOCOLS", - "PROCESSING", - "OK", - "CREATED", - "ACCEPTED", - "NON_AUTHORITATIVE_INFORMATION", - "NO_CONTENT", - "RESET_CONTENT", - "PARTIAL_CONTENT", - "MULTI_STATUS", - "ALREADY_REPORTED", - "IM_USED", - "MULTIPLE_CHOICES", - "MOVED_PERMANENTLY", - "FOUND", - "SEE_OTHER", - "NOT_MODIFIED", - "USE_PROXY", - "TEMPORARY_REDIRECT", - "PERMANENT_REDIRECT", - "BAD_REQUEST", - "UNAUTHORIZED", - "PAYMENT_REQUIRED", - "FORBIDDEN", - "NOT_FOUND", - "METHOD_NOT_ALLOWED", - "NOT_ACCEPTABLE", - "PROXY_AUTHENTICATION_REQUIRED", - "REQUEST_TIMEOUT", - "CONFLICT", - "GONE", - "LENGTH_REQUIRED", - "PRECONDITION_FAILED", - "REQUEST_ENTITY_TOO_LARGE", - "REQUEST_URI_TOO_LONG", - "UNSUPPORTED_MEDIA_TYPE", - "REQUESTED_RANGE_NOT_SATISFIABLE", - "EXPECTATION_FAILED", - "IM_A_TEAPOT", - "MISDIRECTED_REQUEST", - "UNPROCESSABLE_ENTITY", - "LOCKED", - "FAILED_DEPENDENCY", - "UPGRADE_REQUIRED", - "PRECONDITION_REQUIRED", - "TOO_MANY_REQUESTS", - "REQUEST_HEADERS_FIELDS_TOO_LARGE", - "INTERNAL_STALE_SERVICE_DISCOVERY", - "UNAVAILABLE_FOR_LEGAL_REASONS", - "MIGRATION_IN_PROGRESS", - "INTERNAL_SERVER_ERROR", - "NOT_IMPLEMENTED", - "BAD_GATEWAY", - "SERVICE_UNAVAILABLE", - "GATEWAY_TIMEOUT", - "HTTP_VERSION_NOT_SUPPORTED", - "VARIANT_ALSO_NEGOTIATES", - "INSUFFICIENT_STORAGE", - "LOOP_DETECTED", - "NOT_EXTENDED", - "NETWORK_AUTHENTICATION_REQUIRED", - ] # noqa: E501 - if self.local_vars_configuration.client_side_validation and http_status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `http_status` ({0}), must be one of {1}".format(http_status, allowed_values)) # noqa: E501 - - self._http_status = http_status - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map(lambda x: convert(x), value)) - elif isinstance(value, dict): - result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items())) - else: - result[attr] = convert(value) - - return result - - 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, ErrorCategory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ErrorCategory): - return True - - return self.to_dict() != other.to_dict() diff --git a/hubspot/crm/products/models/error_detail.py b/hubspot/crm/products/models/error_detail.py index 73f794ca..0a10f2ed 100644 --- a/hubspot/crm/products/models/error_detail.py +++ b/hubspot/crm/products/models/error_detail.py @@ -35,80 +35,55 @@ class ErrorDetail(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"message": "str", "_in": "str", "code": "str", "sub_category": "str", "context": "dict[str, list[str]]"} + openapi_types = {"sub_category": "str", "code": "str", "_in": "str", "context": "dict[str, list[str]]", "message": "str"} - attribute_map = {"message": "message", "_in": "in", "code": "code", "sub_category": "subCategory", "context": "context"} + attribute_map = {"sub_category": "subCategory", "code": "code", "_in": "in", "context": "context", "message": "message"} - def __init__(self, message=None, _in=None, code=None, sub_category=None, context=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, code=None, _in=None, context=None, message=None, local_vars_configuration=None): # noqa: E501 """ErrorDetail - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._message = None - self.__in = None - self._code = None self._sub_category = None + self._code = None + self.__in = None self._context = None + self._message = None self.discriminator = None - self.message = message - if _in is not None: - self._in = _in - if code is not None: - self.code = code if sub_category is not None: self.sub_category = sub_category + if code is not None: + self.code = code + if _in is not None: + self._in = _in if context is not None: self.context = context + self.message = message @property - def message(self): - """Gets the message of this ErrorDetail. # noqa: E501 - - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - - :return: The message of this ErrorDetail. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ErrorDetail. - - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - - :param message: The message of this ErrorDetail. # noqa: E501 - :type message: str - """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def _in(self): - """Gets the _in of this ErrorDetail. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this ErrorDetail. # noqa: E501 - The name of the field or parameter in which the error was found. # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The _in of this ErrorDetail. # noqa: E501 + :return: The sub_category of this ErrorDetail. # noqa: E501 :rtype: str """ - return self.__in + return self._sub_category - @_in.setter - def _in(self, _in): - """Sets the _in of this ErrorDetail. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this ErrorDetail. - The name of the field or parameter in which the error was found. # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param _in: The _in of this ErrorDetail. # noqa: E501 - :type _in: str + :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 + :type sub_category: str """ - self.__in = _in + self._sub_category = sub_category @property def code(self): @@ -134,27 +109,27 @@ def code(self, code): self._code = code @property - def sub_category(self): - """Gets the sub_category of this ErrorDetail. # noqa: E501 + def _in(self): + """Gets the _in of this ErrorDetail. # noqa: E501 - A specific category that contains more specific detail about the error # noqa: E501 + The name of the field or parameter in which the error was found. # noqa: E501 - :return: The sub_category of this ErrorDetail. # noqa: E501 + :return: The _in of this ErrorDetail. # noqa: E501 :rtype: str """ - return self._sub_category + return self.__in - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this ErrorDetail. + @_in.setter + def _in(self, _in): + """Sets the _in of this ErrorDetail. - A specific category that contains more specific detail about the error # noqa: E501 + The name of the field or parameter in which the error was found. # noqa: E501 - :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 - :type sub_category: str + :param _in: The _in of this ErrorDetail. # noqa: E501 + :type _in: str """ - self._sub_category = sub_category + self.__in = _in @property def context(self): @@ -179,6 +154,31 @@ def context(self, context): self._context = context + @property + def message(self): + """Gets the message of this ErrorDetail. # noqa: E501 + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :return: The message of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ErrorDetail. + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :param message: The message of this ErrorDetail. # noqa: E501 + :type message: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/filter.py b/hubspot/crm/products/models/filter.py index c297a3e8..74c602e7 100644 --- a/hubspot/crm/products/models/filter.py +++ b/hubspot/crm/products/models/filter.py @@ -35,73 +35,75 @@ class Filter(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"value": "str", "high_value": "str", "values": "list[str]", "property_name": "str", "operator": "str"} + openapi_types = {"high_value": "str", "property_name": "str", "values": "list[str]", "value": "str", "operator": "str"} - attribute_map = {"value": "value", "high_value": "highValue", "values": "values", "property_name": "propertyName", "operator": "operator"} + attribute_map = {"high_value": "highValue", "property_name": "propertyName", "values": "values", "value": "value", "operator": "operator"} - def __init__(self, value=None, high_value=None, values=None, property_name=None, operator=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, high_value=None, property_name=None, values=None, value=None, operator=None, local_vars_configuration=None): # noqa: E501 """Filter - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._value = None self._high_value = None - self._values = None self._property_name = None + self._values = None + self._value = None self._operator = None self.discriminator = None - if value is not None: - self.value = value if high_value is not None: self.high_value = high_value + self.property_name = property_name if values is not None: self.values = values - self.property_name = property_name + if value is not None: + self.value = value self.operator = operator @property - def value(self): - """Gets the value of this Filter. # noqa: E501 + def high_value(self): + """Gets the high_value of this Filter. # noqa: E501 - :return: The value of this Filter. # noqa: E501 + :return: The high_value of this Filter. # noqa: E501 :rtype: str """ - return self._value + return self._high_value - @value.setter - def value(self, value): - """Sets the value of this Filter. + @high_value.setter + def high_value(self, high_value): + """Sets the high_value of this Filter. - :param value: The value of this Filter. # noqa: E501 - :type value: str + :param high_value: The high_value of this Filter. # noqa: E501 + :type high_value: str """ - self._value = value + self._high_value = high_value @property - def high_value(self): - """Gets the high_value of this Filter. # noqa: E501 + def property_name(self): + """Gets the property_name of this Filter. # noqa: E501 - :return: The high_value of this Filter. # noqa: E501 + :return: The property_name of this Filter. # noqa: E501 :rtype: str """ - return self._high_value + return self._property_name - @high_value.setter - def high_value(self, high_value): - """Sets the high_value of this Filter. + @property_name.setter + def property_name(self, property_name): + """Sets the property_name of this Filter. - :param high_value: The high_value of this Filter. # noqa: E501 - :type high_value: str + :param property_name: The property_name of this Filter. # noqa: E501 + :type property_name: str """ + if self.local_vars_configuration.client_side_validation and property_name is None: # noqa: E501 + raise ValueError("Invalid value for `property_name`, must not be `None`") # noqa: E501 - self._high_value = high_value + self._property_name = property_name @property def values(self): @@ -125,27 +127,25 @@ def values(self, values): self._values = values @property - def property_name(self): - """Gets the property_name of this Filter. # noqa: E501 + def value(self): + """Gets the value of this Filter. # noqa: E501 - :return: The property_name of this Filter. # noqa: E501 + :return: The value of this Filter. # noqa: E501 :rtype: str """ - return self._property_name + return self._value - @property_name.setter - def property_name(self, property_name): - """Sets the property_name of this Filter. + @value.setter + def value(self, value): + """Sets the value of this Filter. - :param property_name: The property_name of this Filter. # noqa: E501 - :type property_name: str + :param value: The value of this Filter. # noqa: E501 + :type value: str """ - if self.local_vars_configuration.client_side_validation and property_name is None: # noqa: E501 - raise ValueError("Invalid value for `property_name`, must not be `None`") # noqa: E501 - self._property_name = property_name + self._value = value @property def operator(self): diff --git a/hubspot/crm/products/models/next_page.py b/hubspot/crm/products/models/next_page.py index 1d29e727..7c3df579 100644 --- a/hubspot/crm/products/models/next_page.py +++ b/hubspot/crm/products/models/next_page.py @@ -35,23 +35,44 @@ class NextPage(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"after": "str", "link": "str"} + openapi_types = {"link": "str", "after": "str"} - attribute_map = {"after": "after", "link": "link"} + attribute_map = {"link": "link", "after": "after"} - def __init__(self, after=None, link=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, link=None, after=None, local_vars_configuration=None): # noqa: E501 """NextPage - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._after = None self._link = None + self._after = None self.discriminator = None - self.after = after if link is not None: self.link = link + self.after = after + + @property + def link(self): + """Gets the link of this NextPage. # noqa: E501 + + + :return: The link of this NextPage. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this NextPage. + + + :param link: The link of this NextPage. # noqa: E501 + :type link: str + """ + + self._link = link @property def after(self): @@ -76,27 +97,6 @@ def after(self, after): self._after = after - @property - def link(self): - """Gets the link of this NextPage. # noqa: E501 - - - :return: The link of this NextPage. # noqa: E501 - :rtype: str - """ - return self._link - - @link.setter - def link(self, link): - """Sets the link of this NextPage. - - - :param link: The link of this NextPage. # noqa: E501 - :type link: str - """ - - self._link = link - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/public_associations_for_object.py b/hubspot/crm/products/models/public_associations_for_object.py index d301f040..cec84d46 100644 --- a/hubspot/crm/products/models/public_associations_for_object.py +++ b/hubspot/crm/products/models/public_associations_for_object.py @@ -35,45 +35,22 @@ class PublicAssociationsForObject(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"to": "PublicObjectId", "types": "list[AssociationSpec]"} + openapi_types = {"types": "list[AssociationSpec]", "to": "PublicObjectId"} - attribute_map = {"to": "to", "types": "types"} + attribute_map = {"types": "types", "to": "to"} - def __init__(self, to=None, types=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, types=None, to=None, local_vars_configuration=None): # noqa: E501 """PublicAssociationsForObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._to = None self._types = None + self._to = None self.discriminator = None - self.to = to self.types = types - - @property - def to(self): - """Gets the to of this PublicAssociationsForObject. # noqa: E501 - - - :return: The to of this PublicAssociationsForObject. # noqa: E501 - :rtype: PublicObjectId - """ - return self._to - - @to.setter - def to(self, to): - """Sets the to of this PublicAssociationsForObject. - - - :param to: The to of this PublicAssociationsForObject. # noqa: E501 - :type to: PublicObjectId - """ - if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 - raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 - - self._to = to + self.to = to @property def types(self): @@ -98,6 +75,29 @@ def types(self, types): self._types = types + @property + def to(self): + """Gets the to of this PublicAssociationsForObject. # noqa: E501 + + + :return: The to of this PublicAssociationsForObject. # noqa: E501 + :rtype: PublicObjectId + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this PublicAssociationsForObject. + + + :param to: The to of this PublicAssociationsForObject. # noqa: E501 + :type to: PublicObjectId + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/public_gdpr_delete_input.py b/hubspot/crm/products/models/public_gdpr_delete_input.py new file mode 100644 index 00000000..c0ea8b8a --- /dev/null +++ b/hubspot/crm/products/models/public_gdpr_delete_input.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Products + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v3 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from hubspot.crm.products.configuration import Configuration + + +class PublicGdprDeleteInput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"id_property": "str", "object_id": "str"} + + attribute_map = {"id_property": "idProperty", "object_id": "objectId"} + + def __init__(self, id_property=None, object_id=None, local_vars_configuration=None): # noqa: E501 + """PublicGdprDeleteInput - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._id_property = None + self._object_id = None + self.discriminator = None + + if id_property is not None: + self.id_property = id_property + self.object_id = object_id + + @property + def id_property(self): + """Gets the id_property of this PublicGdprDeleteInput. # noqa: E501 + + + :return: The id_property of this PublicGdprDeleteInput. # noqa: E501 + :rtype: str + """ + return self._id_property + + @id_property.setter + def id_property(self, id_property): + """Sets the id_property of this PublicGdprDeleteInput. + + + :param id_property: The id_property of this PublicGdprDeleteInput. # noqa: E501 + :type id_property: str + """ + + self._id_property = id_property + + @property + def object_id(self): + """Gets the object_id of this PublicGdprDeleteInput. # noqa: E501 + + + :return: The object_id of this PublicGdprDeleteInput. # noqa: E501 + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """Sets the object_id of this PublicGdprDeleteInput. + + + :param object_id: The object_id of this PublicGdprDeleteInput. # noqa: E501 + :type object_id: str + """ + if self.local_vars_configuration.client_side_validation and object_id is None: # noqa: E501 + raise ValueError("Invalid value for `object_id`, must not be `None`") # noqa: E501 + + self._object_id = object_id + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map(lambda x: convert(x), value)) + elif isinstance(value, dict): + result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items())) + else: + result[attr] = convert(value) + + return result + + 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, PublicGdprDeleteInput): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PublicGdprDeleteInput): + return True + + return self.to_dict() != other.to_dict() diff --git a/hubspot/crm/products/models/public_merge_input.py b/hubspot/crm/products/models/public_merge_input.py index 7a553b8c..9c8df464 100644 --- a/hubspot/crm/products/models/public_merge_input.py +++ b/hubspot/crm/products/models/public_merge_input.py @@ -35,45 +35,22 @@ class PublicMergeInput(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"primary_object_id": "str", "object_id_to_merge": "str"} + openapi_types = {"object_id_to_merge": "str", "primary_object_id": "str"} - attribute_map = {"primary_object_id": "primaryObjectId", "object_id_to_merge": "objectIdToMerge"} + attribute_map = {"object_id_to_merge": "objectIdToMerge", "primary_object_id": "primaryObjectId"} - def __init__(self, primary_object_id=None, object_id_to_merge=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, object_id_to_merge=None, primary_object_id=None, local_vars_configuration=None): # noqa: E501 """PublicMergeInput - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._primary_object_id = None self._object_id_to_merge = None + self._primary_object_id = None self.discriminator = None - self.primary_object_id = primary_object_id self.object_id_to_merge = object_id_to_merge - - @property - def primary_object_id(self): - """Gets the primary_object_id of this PublicMergeInput. # noqa: E501 - - - :return: The primary_object_id of this PublicMergeInput. # noqa: E501 - :rtype: str - """ - return self._primary_object_id - - @primary_object_id.setter - def primary_object_id(self, primary_object_id): - """Sets the primary_object_id of this PublicMergeInput. - - - :param primary_object_id: The primary_object_id of this PublicMergeInput. # noqa: E501 - :type primary_object_id: str - """ - if self.local_vars_configuration.client_side_validation and primary_object_id is None: # noqa: E501 - raise ValueError("Invalid value for `primary_object_id`, must not be `None`") # noqa: E501 - - self._primary_object_id = primary_object_id + self.primary_object_id = primary_object_id @property def object_id_to_merge(self): @@ -98,6 +75,29 @@ def object_id_to_merge(self, object_id_to_merge): self._object_id_to_merge = object_id_to_merge + @property + def primary_object_id(self): + """Gets the primary_object_id of this PublicMergeInput. # noqa: E501 + + + :return: The primary_object_id of this PublicMergeInput. # noqa: E501 + :rtype: str + """ + return self._primary_object_id + + @primary_object_id.setter + def primary_object_id(self, primary_object_id): + """Sets the primary_object_id of this PublicMergeInput. + + + :param primary_object_id: The primary_object_id of this PublicMergeInput. # noqa: E501 + :type primary_object_id: str + """ + if self.local_vars_configuration.client_side_validation and primary_object_id is None: # noqa: E501 + raise ValueError("Invalid value for `primary_object_id`, must not be `None`") # noqa: E501 + + self._primary_object_id = primary_object_id + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/public_object_search_request.py b/hubspot/crm/products/models/public_object_search_request.py index baa0e1f1..104928aa 100644 --- a/hubspot/crm/products/models/public_object_search_request.py +++ b/hubspot/crm/products/models/public_object_search_request.py @@ -35,54 +35,98 @@ class PublicObjectSearchRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"filter_groups": "list[FilterGroup]", "sorts": "list[str]", "query": "str", "properties": "list[str]", "limit": "int", "after": "int"} + openapi_types = {"query": "str", "limit": "int", "after": "str", "sorts": "list[str]", "properties": "list[str]", "filter_groups": "list[FilterGroup]"} - attribute_map = {"filter_groups": "filterGroups", "sorts": "sorts", "query": "query", "properties": "properties", "limit": "limit", "after": "after"} + attribute_map = {"query": "query", "limit": "limit", "after": "after", "sorts": "sorts", "properties": "properties", "filter_groups": "filterGroups"} - def __init__(self, filter_groups=None, sorts=None, query=None, properties=None, limit=None, after=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, query=None, limit=None, after=None, sorts=None, properties=None, filter_groups=None, local_vars_configuration=None): # noqa: E501 """PublicObjectSearchRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._filter_groups = None - self._sorts = None self._query = None - self._properties = None self._limit = None self._after = None + self._sorts = None + self._properties = None + self._filter_groups = None self.discriminator = None - self.filter_groups = filter_groups - self.sorts = sorts if query is not None: self.query = query - self.properties = properties self.limit = limit self.after = after + self.sorts = sorts + self.properties = properties + self.filter_groups = filter_groups @property - def filter_groups(self): - """Gets the filter_groups of this PublicObjectSearchRequest. # noqa: E501 + def query(self): + """Gets the query of this PublicObjectSearchRequest. # noqa: E501 - :return: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :rtype: list[FilterGroup] + :return: The query of this PublicObjectSearchRequest. # noqa: E501 + :rtype: str """ - return self._filter_groups + return self._query - @filter_groups.setter - def filter_groups(self, filter_groups): - """Sets the filter_groups of this PublicObjectSearchRequest. + @query.setter + def query(self, query): + """Sets the query of this PublicObjectSearchRequest. - :param filter_groups: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :type filter_groups: list[FilterGroup] + :param query: The query of this PublicObjectSearchRequest. # noqa: E501 + :type query: str """ - if self.local_vars_configuration.client_side_validation and filter_groups is None: # noqa: E501 - raise ValueError("Invalid value for `filter_groups`, must not be `None`") # noqa: E501 - self._filter_groups = filter_groups + self._query = query + + @property + def limit(self): + """Gets the limit of this PublicObjectSearchRequest. # noqa: E501 + + + :return: The limit of this PublicObjectSearchRequest. # noqa: E501 + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this PublicObjectSearchRequest. + + + :param limit: The limit of this PublicObjectSearchRequest. # noqa: E501 + :type limit: int + """ + if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 + raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 + + self._limit = limit + + @property + def after(self): + """Gets the after of this PublicObjectSearchRequest. # noqa: E501 + + + :return: The after of this PublicObjectSearchRequest. # noqa: E501 + :rtype: str + """ + return self._after + + @after.setter + def after(self, after): + """Sets the after of this PublicObjectSearchRequest. + + + :param after: The after of this PublicObjectSearchRequest. # noqa: E501 + :type after: str + """ + if self.local_vars_configuration.client_side_validation and after is None: # noqa: E501 + raise ValueError("Invalid value for `after`, must not be `None`") # noqa: E501 + + self._after = after @property def sorts(self): @@ -107,27 +151,6 @@ def sorts(self, sorts): self._sorts = sorts - @property - def query(self): - """Gets the query of this PublicObjectSearchRequest. # noqa: E501 - - - :return: The query of this PublicObjectSearchRequest. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this PublicObjectSearchRequest. - - - :param query: The query of this PublicObjectSearchRequest. # noqa: E501 - :type query: str - """ - - self._query = query - @property def properties(self): """Gets the properties of this PublicObjectSearchRequest. # noqa: E501 @@ -152,50 +175,27 @@ def properties(self, properties): self._properties = properties @property - def limit(self): - """Gets the limit of this PublicObjectSearchRequest. # noqa: E501 - - - :return: The limit of this PublicObjectSearchRequest. # noqa: E501 - :rtype: int - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this PublicObjectSearchRequest. - - - :param limit: The limit of this PublicObjectSearchRequest. # noqa: E501 - :type limit: int - """ - if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 - raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 - - self._limit = limit - - @property - def after(self): - """Gets the after of this PublicObjectSearchRequest. # noqa: E501 + def filter_groups(self): + """Gets the filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :return: The after of this PublicObjectSearchRequest. # noqa: E501 - :rtype: int + :return: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 + :rtype: list[FilterGroup] """ - return self._after + return self._filter_groups - @after.setter - def after(self, after): - """Sets the after of this PublicObjectSearchRequest. + @filter_groups.setter + def filter_groups(self, filter_groups): + """Sets the filter_groups of this PublicObjectSearchRequest. - :param after: The after of this PublicObjectSearchRequest. # noqa: E501 - :type after: int + :param filter_groups: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 + :type filter_groups: list[FilterGroup] """ - if self.local_vars_configuration.client_side_validation and after is None: # noqa: E501 - raise ValueError("Invalid value for `after`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and filter_groups is None: # noqa: E501 + raise ValueError("Invalid value for `filter_groups`, must not be `None`") # noqa: E501 - self._after = after + self._filter_groups = filter_groups def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/products/models/simple_public_object.py b/hubspot/crm/products/models/simple_public_object.py index e34e4a84..ec85e126 100644 --- a/hubspot/crm/products/models/simple_public_object.py +++ b/hubspot/crm/products/models/simple_public_object.py @@ -36,96 +36,116 @@ class SimplePublicObject(object): and the value is json key in definition. """ openapi_types = { - "id": "str", - "properties": "dict[str, str]", - "properties_with_history": "dict[str, list[ValueWithTimestamp]]", "created_at": "datetime", - "updated_at": "datetime", "archived": "bool", "archived_at": "datetime", + "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "id": "str", + "properties": "dict[str, str]", + "updated_at": "datetime", } attribute_map = { - "id": "id", - "properties": "properties", - "properties_with_history": "propertiesWithHistory", "created_at": "createdAt", - "updated_at": "updatedAt", "archived": "archived", "archived_at": "archivedAt", + "properties_with_history": "propertiesWithHistory", + "id": "id", + "properties": "properties", + "updated_at": "updatedAt", } - def __init__(self, id=None, properties=None, properties_with_history=None, created_at=None, updated_at=None, archived=None, archived_at=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, created_at=None, archived=None, archived_at=None, properties_with_history=None, id=None, properties=None, updated_at=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._id = None - self._properties = None - self._properties_with_history = None self._created_at = None - self._updated_at = None self._archived = None self._archived_at = None + self._properties_with_history = None + self._id = None + self._properties = None + self._updated_at = None self.discriminator = None - self.id = id - self.properties = properties - if properties_with_history is not None: - self.properties_with_history = properties_with_history self.created_at = created_at - self.updated_at = updated_at if archived is not None: self.archived = archived if archived_at is not None: self.archived_at = archived_at + if properties_with_history is not None: + self.properties_with_history = properties_with_history + self.id = id + if properties is not None: + self.properties = properties + self.updated_at = updated_at @property - def id(self): - """Gets the id of this SimplePublicObject. # noqa: E501 + def created_at(self): + """Gets the created_at of this SimplePublicObject. # noqa: E501 - :return: The id of this SimplePublicObject. # noqa: E501 - :rtype: str + :return: The created_at of this SimplePublicObject. # noqa: E501 + :rtype: datetime """ - return self._id + return self._created_at - @id.setter - def id(self, id): - """Sets the id of this SimplePublicObject. + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SimplePublicObject. - :param id: The id of this SimplePublicObject. # noqa: E501 - :type id: str + :param created_at: The created_at of this SimplePublicObject. # noqa: E501 + :type created_at: datetime """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 - self._id = id + self._created_at = created_at @property - def properties(self): - """Gets the properties of this SimplePublicObject. # noqa: E501 + def archived(self): + """Gets the archived of this SimplePublicObject. # noqa: E501 - :return: The properties of this SimplePublicObject. # noqa: E501 - :rtype: dict[str, str] + :return: The archived of this SimplePublicObject. # noqa: E501 + :rtype: bool """ - return self._properties + return self._archived - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObject. + @archived.setter + def archived(self, archived): + """Sets the archived of this SimplePublicObject. - :param properties: The properties of this SimplePublicObject. # noqa: E501 - :type properties: dict[str, str] + :param archived: The archived of this SimplePublicObject. # noqa: E501 + :type archived: bool """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - self._properties = properties + self._archived = archived + + @property + def archived_at(self): + """Gets the archived_at of this SimplePublicObject. # noqa: E501 + + + :return: The archived_at of this SimplePublicObject. # noqa: E501 + :rtype: datetime + """ + return self._archived_at + + @archived_at.setter + def archived_at(self, archived_at): + """Sets the archived_at of this SimplePublicObject. + + + :param archived_at: The archived_at of this SimplePublicObject. # noqa: E501 + :type archived_at: datetime + """ + + self._archived_at = archived_at @property def properties_with_history(self): @@ -149,27 +169,48 @@ def properties_with_history(self, properties_with_history): self._properties_with_history = properties_with_history @property - def created_at(self): - """Gets the created_at of this SimplePublicObject. # noqa: E501 + def id(self): + """Gets the id of this SimplePublicObject. # noqa: E501 - :return: The created_at of this SimplePublicObject. # noqa: E501 - :rtype: datetime + :return: The id of this SimplePublicObject. # noqa: E501 + :rtype: str """ - return self._created_at + return self._id - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this SimplePublicObject. + @id.setter + def id(self, id): + """Sets the id of this SimplePublicObject. - :param created_at: The created_at of this SimplePublicObject. # noqa: E501 - :type created_at: datetime + :param id: The id of this SimplePublicObject. # noqa: E501 + :type id: str """ - if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 - raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._created_at = created_at + self._id = id + + @property + def properties(self): + """Gets the properties of this SimplePublicObject. # noqa: E501 + + + :return: The properties of this SimplePublicObject. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObject. + + + :param properties: The properties of this SimplePublicObject. # noqa: E501 + :type properties: dict[str, str] + """ + + self._properties = properties @property def updated_at(self): @@ -194,48 +235,6 @@ def updated_at(self, updated_at): self._updated_at = updated_at - @property - def archived(self): - """Gets the archived of this SimplePublicObject. # noqa: E501 - - - :return: The archived of this SimplePublicObject. # noqa: E501 - :rtype: bool - """ - return self._archived - - @archived.setter - def archived(self, archived): - """Sets the archived of this SimplePublicObject. - - - :param archived: The archived of this SimplePublicObject. # noqa: E501 - :type archived: bool - """ - - self._archived = archived - - @property - def archived_at(self): - """Gets the archived_at of this SimplePublicObject. # noqa: E501 - - - :return: The archived_at of this SimplePublicObject. # noqa: E501 - :rtype: datetime - """ - return self._archived_at - - @archived_at.setter - def archived_at(self, archived_at): - """Sets the archived_at of this SimplePublicObject. - - - :param archived_at: The archived_at of this SimplePublicObject. # noqa: E501 - :type archived_at: datetime - """ - - self._archived_at = archived_at - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/simple_public_object_batch_input.py b/hubspot/crm/products/models/simple_public_object_batch_input.py index da3c09a0..ef92c813 100644 --- a/hubspot/crm/products/models/simple_public_object_batch_input.py +++ b/hubspot/crm/products/models/simple_public_object_batch_input.py @@ -35,45 +35,48 @@ class SimplePublicObjectBatchInput(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "dict[str, str]", "id": "str"} + openapi_types = {"id_property": "str", "id": "str", "properties": "dict[str, str]"} - attribute_map = {"properties": "properties", "id": "id"} + attribute_map = {"id_property": "idProperty", "id": "id", "properties": "properties"} - def __init__(self, properties=None, id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id_property=None, id=None, properties=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObjectBatchInput - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None + self._id_property = None self._id = None + self._properties = None self.discriminator = None - self.properties = properties - self.id = id + if id_property is not None: + self.id_property = id_property + if id is not None: + self.id = id + if properties is not None: + self.properties = properties @property - def properties(self): - """Gets the properties of this SimplePublicObjectBatchInput. # noqa: E501 + def id_property(self): + """Gets the id_property of this SimplePublicObjectBatchInput. # noqa: E501 - :return: The properties of this SimplePublicObjectBatchInput. # noqa: E501 - :rtype: dict[str, str] + :return: The id_property of this SimplePublicObjectBatchInput. # noqa: E501 + :rtype: str """ - return self._properties + return self._id_property - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectBatchInput. + @id_property.setter + def id_property(self, id_property): + """Sets the id_property of this SimplePublicObjectBatchInput. - :param properties: The properties of this SimplePublicObjectBatchInput. # noqa: E501 - :type properties: dict[str, str] + :param id_property: The id_property of this SimplePublicObjectBatchInput. # noqa: E501 + :type id_property: str """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - self._properties = properties + self._id_property = id_property @property def id(self): @@ -93,11 +96,30 @@ def id(self, id): :param id: The id of this SimplePublicObjectBatchInput. # noqa: E501 :type id: str """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id + @property + def properties(self): + """Gets the properties of this SimplePublicObjectBatchInput. # noqa: E501 + + + :return: The properties of this SimplePublicObjectBatchInput. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectBatchInput. + + + :param properties: The properties of this SimplePublicObjectBatchInput. # noqa: E501 + :type properties: dict[str, str] + """ + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/simple_public_object_input.py b/hubspot/crm/products/models/simple_public_object_input.py index eb0df3b0..2e18660c 100644 --- a/hubspot/crm/products/models/simple_public_object_input.py +++ b/hubspot/crm/products/models/simple_public_object_input.py @@ -48,12 +48,14 @@ def __init__(self, properties=None, local_vars_configuration=None): # noqa: E50 self._properties = None self.discriminator = None - self.properties = properties + if properties is not None: + self.properties = properties @property def properties(self): """Gets the properties of this SimplePublicObjectInput. # noqa: E501 + # noqa: E501 :return: The properties of this SimplePublicObjectInput. # noqa: E501 :rtype: dict[str, str] @@ -64,12 +66,11 @@ def properties(self): def properties(self, properties): """Sets the properties of this SimplePublicObjectInput. + # noqa: E501 :param properties: The properties of this SimplePublicObjectInput. # noqa: E501 :type properties: dict[str, str] """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 self._properties = properties diff --git a/hubspot/crm/products/models/simple_public_object_input_for_create.py b/hubspot/crm/products/models/simple_public_object_input_for_create.py index 598d1a2b..c4ed10e7 100644 --- a/hubspot/crm/products/models/simple_public_object_input_for_create.py +++ b/hubspot/crm/products/models/simple_public_object_input_for_create.py @@ -35,45 +35,24 @@ class SimplePublicObjectInputForCreate(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "dict[str, str]", "associations": "list[PublicAssociationsForObject]"} + openapi_types = {"associations": "list[PublicAssociationsForObject]", "properties": "dict[str, str]"} - attribute_map = {"properties": "properties", "associations": "associations"} + attribute_map = {"associations": "associations", "properties": "properties"} - def __init__(self, properties=None, associations=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, associations=None, properties=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObjectInputForCreate - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None self._associations = None + self._properties = None self.discriminator = None - self.properties = properties - self.associations = associations - - @property - def properties(self): - """Gets the properties of this SimplePublicObjectInputForCreate. # noqa: E501 - - - :return: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 - :rtype: dict[str, str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectInputForCreate. - - - :param properties: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 - :type properties: dict[str, str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + if associations is not None: + self.associations = associations + if properties is not None: + self.properties = properties @property def associations(self): @@ -93,11 +72,32 @@ def associations(self, associations): :param associations: The associations of this SimplePublicObjectInputForCreate. # noqa: E501 :type associations: list[PublicAssociationsForObject] """ - if self.local_vars_configuration.client_side_validation and associations is None: # noqa: E501 - raise ValueError("Invalid value for `associations`, must not be `None`") # noqa: E501 self._associations = associations + @property + def properties(self): + """Gets the properties of this SimplePublicObjectInputForCreate. # noqa: E501 + + # noqa: E501 + + :return: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectInputForCreate. + + # noqa: E501 + + :param properties: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 + :type properties: dict[str, str] + """ + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/products/models/simple_public_object_with_associations.py b/hubspot/crm/products/models/simple_public_object_with_associations.py index 5356d765..a9b4c8f1 100644 --- a/hubspot/crm/products/models/simple_public_object_with_associations.py +++ b/hubspot/crm/products/models/simple_public_object_with_associations.py @@ -36,124 +36,78 @@ class SimplePublicObjectWithAssociations(object): and the value is json key in definition. """ openapi_types = { - "id": "str", - "properties": "dict[str, str]", - "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "associations": "dict[str, CollectionResponseAssociatedId]", "created_at": "datetime", - "updated_at": "datetime", "archived": "bool", "archived_at": "datetime", - "associations": "dict[str, CollectionResponseAssociatedId]", + "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "id": "str", + "properties": "dict[str, str]", + "updated_at": "datetime", } attribute_map = { - "id": "id", - "properties": "properties", - "properties_with_history": "propertiesWithHistory", + "associations": "associations", "created_at": "createdAt", - "updated_at": "updatedAt", "archived": "archived", "archived_at": "archivedAt", - "associations": "associations", + "properties_with_history": "propertiesWithHistory", + "id": "id", + "properties": "properties", + "updated_at": "updatedAt", } def __init__( - self, id=None, properties=None, properties_with_history=None, created_at=None, updated_at=None, archived=None, archived_at=None, associations=None, local_vars_configuration=None + self, associations=None, created_at=None, archived=None, archived_at=None, properties_with_history=None, id=None, properties=None, updated_at=None, local_vars_configuration=None ): # noqa: E501 """SimplePublicObjectWithAssociations - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._id = None - self._properties = None - self._properties_with_history = None + self._associations = None self._created_at = None - self._updated_at = None self._archived = None self._archived_at = None - self._associations = None + self._properties_with_history = None + self._id = None + self._properties = None + self._updated_at = None self.discriminator = None - self.id = id - self.properties = properties - if properties_with_history is not None: - self.properties_with_history = properties_with_history + if associations is not None: + self.associations = associations self.created_at = created_at - self.updated_at = updated_at if archived is not None: self.archived = archived if archived_at is not None: self.archived_at = archived_at - if associations is not None: - self.associations = associations - - @property - def id(self): - """Gets the id of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The id of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this SimplePublicObjectWithAssociations. - - - :param id: The id of this SimplePublicObjectWithAssociations. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def properties(self): - """Gets the properties of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectWithAssociations. - - - :param properties: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 - :type properties: dict[str, str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + if properties_with_history is not None: + self.properties_with_history = properties_with_history + self.id = id + self.properties = properties + self.updated_at = updated_at @property - def properties_with_history(self): - """Gets the properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + def associations(self): + """Gets the associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :return: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, list[ValueWithTimestamp]] + :return: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, CollectionResponseAssociatedId] """ - return self._properties_with_history + return self._associations - @properties_with_history.setter - def properties_with_history(self, properties_with_history): - """Sets the properties_with_history of this SimplePublicObjectWithAssociations. + @associations.setter + def associations(self, associations): + """Sets the associations of this SimplePublicObjectWithAssociations. - :param properties_with_history: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :type properties_with_history: dict[str, list[ValueWithTimestamp]] + :param associations: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 + :type associations: dict[str, CollectionResponseAssociatedId] """ - self._properties_with_history = properties_with_history + self._associations = associations @property def created_at(self): @@ -178,29 +132,6 @@ def created_at(self, created_at): self._created_at = created_at - @property - def updated_at(self): - """Gets the updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: datetime - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this SimplePublicObjectWithAssociations. - - - :param updated_at: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - :type updated_at: datetime - """ - if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 - raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 - - self._updated_at = updated_at - @property def archived(self): """Gets the archived of this SimplePublicObjectWithAssociations. # noqa: E501 @@ -244,25 +175,94 @@ def archived_at(self, archived_at): self._archived_at = archived_at @property - def associations(self): - """Gets the associations of this SimplePublicObjectWithAssociations. # noqa: E501 + def properties_with_history(self): + """Gets the properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :return: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, CollectionResponseAssociatedId] + :return: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, list[ValueWithTimestamp]] """ - return self._associations + return self._properties_with_history - @associations.setter - def associations(self, associations): - """Sets the associations of this SimplePublicObjectWithAssociations. + @properties_with_history.setter + def properties_with_history(self, properties_with_history): + """Sets the properties_with_history of this SimplePublicObjectWithAssociations. - :param associations: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :type associations: dict[str, CollectionResponseAssociatedId] + :param properties_with_history: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + :type properties_with_history: dict[str, list[ValueWithTimestamp]] """ - self._associations = associations + self._properties_with_history = properties_with_history + + @property + def id(self): + """Gets the id of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The id of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SimplePublicObjectWithAssociations. + + + :param id: The id of this SimplePublicObjectWithAssociations. # noqa: E501 + :type id: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def properties(self): + """Gets the properties of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectWithAssociations. + + + :param properties: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + + @property + def updated_at(self): + """Gets the updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this SimplePublicObjectWithAssociations. + + + :param updated_at: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + :type updated_at: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/products/models/standard_error.py b/hubspot/crm/products/models/standard_error.py index 1ca355f6..da783c18 100644 --- a/hubspot/crm/products/models/standard_error.py +++ b/hubspot/crm/products/models/standard_error.py @@ -36,67 +36,111 @@ class StandardError(object): and the value is json key in definition. """ openapi_types = { - "status": "str", + "sub_category": "object", + "context": "dict[str, list[str]]", + "links": "dict[str, str]", "id": "str", "category": "str", - "sub_category": "object", "message": "str", "errors": "list[ErrorDetail]", - "context": "dict[str, list[str]]", - "links": "dict[str, str]", + "status": "str", } - attribute_map = {"status": "status", "id": "id", "category": "category", "sub_category": "subCategory", "message": "message", "errors": "errors", "context": "context", "links": "links"} + attribute_map = {"sub_category": "subCategory", "context": "context", "links": "links", "id": "id", "category": "category", "message": "message", "errors": "errors", "status": "status"} - def __init__(self, status=None, id=None, category=None, sub_category=None, message=None, errors=None, context=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, context=None, links=None, id=None, category=None, message=None, errors=None, status=None, local_vars_configuration=None): # noqa: E501 """StandardError - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None + self._sub_category = None + self._context = None + self._links = None self._id = None self._category = None - self._sub_category = None self._message = None self._errors = None - self._context = None - self._links = None + self._status = None self.discriminator = None - self.status = status + if sub_category is not None: + self.sub_category = sub_category + self.context = context + self.links = links if id is not None: self.id = id self.category = category - if sub_category is not None: - self.sub_category = sub_category self.message = message self.errors = errors - self.context = context - self.links = links + self.status = status @property - def status(self): - """Gets the status of this StandardError. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this StandardError. # noqa: E501 - :return: The status of this StandardError. # noqa: E501 - :rtype: str + :return: The sub_category of this StandardError. # noqa: E501 + :rtype: object """ - return self._status + return self._sub_category - @status.setter - def status(self, status): - """Sets the status of this StandardError. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this StandardError. - :param status: The status of this StandardError. # noqa: E501 - :type status: str + :param sub_category: The sub_category of this StandardError. # noqa: E501 + :type sub_category: object """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._status = status + self._sub_category = sub_category + + @property + def context(self): + """Gets the context of this StandardError. # noqa: E501 + + + :return: The context of this StandardError. # noqa: E501 + :rtype: dict[str, list[str]] + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this StandardError. + + + :param context: The context of this StandardError. # noqa: E501 + :type context: dict[str, list[str]] + """ + if self.local_vars_configuration.client_side_validation and context is None: # noqa: E501 + raise ValueError("Invalid value for `context`, must not be `None`") # noqa: E501 + + self._context = context + + @property + def links(self): + """Gets the links of this StandardError. # noqa: E501 + + + :return: The links of this StandardError. # noqa: E501 + :rtype: dict[str, str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this StandardError. + + + :param links: The links of this StandardError. # noqa: E501 + :type links: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 + raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + + self._links = links @property def id(self): @@ -142,27 +186,6 @@ def category(self, category): self._category = category - @property - def sub_category(self): - """Gets the sub_category of this StandardError. # noqa: E501 - - - :return: The sub_category of this StandardError. # noqa: E501 - :rtype: object - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this StandardError. - - - :param sub_category: The sub_category of this StandardError. # noqa: E501 - :type sub_category: object - """ - - self._sub_category = sub_category - @property def message(self): """Gets the message of this StandardError. # noqa: E501 @@ -210,50 +233,27 @@ def errors(self, errors): self._errors = errors @property - def context(self): - """Gets the context of this StandardError. # noqa: E501 - - - :return: The context of this StandardError. # noqa: E501 - :rtype: dict[str, list[str]] - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this StandardError. - - - :param context: The context of this StandardError. # noqa: E501 - :type context: dict[str, list[str]] - """ - if self.local_vars_configuration.client_side_validation and context is None: # noqa: E501 - raise ValueError("Invalid value for `context`, must not be `None`") # noqa: E501 - - self._context = context - - @property - def links(self): - """Gets the links of this StandardError. # noqa: E501 + def status(self): + """Gets the status of this StandardError. # noqa: E501 - :return: The links of this StandardError. # noqa: E501 - :rtype: dict[str, str] + :return: The status of this StandardError. # noqa: E501 + :rtype: str """ - return self._links + return self._status - @links.setter - def links(self, links): - """Sets the links of this StandardError. + @status.setter + def status(self, status): + """Sets the status of this StandardError. - :param links: The links of this StandardError. # noqa: E501 - :type links: dict[str, str] + :param status: The status of this StandardError. # noqa: E501 + :type status: str """ - if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 - raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._links = links + self._status = status def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/products/models/value_with_timestamp.py b/hubspot/crm/products/models/value_with_timestamp.py index b7b715c2..0d871879 100644 --- a/hubspot/crm/products/models/value_with_timestamp.py +++ b/hubspot/crm/products/models/value_with_timestamp.py @@ -35,79 +35,54 @@ class ValueWithTimestamp(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"value": "str", "timestamp": "datetime", "source_type": "str", "source_id": "str", "source_label": "str", "updated_by_user_id": "int"} + openapi_types = {"source_id": "str", "source_type": "str", "source_label": "str", "updated_by_user_id": "int", "value": "str", "timestamp": "datetime"} - attribute_map = {"value": "value", "timestamp": "timestamp", "source_type": "sourceType", "source_id": "sourceId", "source_label": "sourceLabel", "updated_by_user_id": "updatedByUserId"} + attribute_map = {"source_id": "sourceId", "source_type": "sourceType", "source_label": "sourceLabel", "updated_by_user_id": "updatedByUserId", "value": "value", "timestamp": "timestamp"} - def __init__(self, value=None, timestamp=None, source_type=None, source_id=None, source_label=None, updated_by_user_id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, source_id=None, source_type=None, source_label=None, updated_by_user_id=None, value=None, timestamp=None, local_vars_configuration=None): # noqa: E501 """ValueWithTimestamp - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._value = None - self._timestamp = None - self._source_type = None self._source_id = None + self._source_type = None self._source_label = None self._updated_by_user_id = None + self._value = None + self._timestamp = None self.discriminator = None - self.value = value - self.timestamp = timestamp - self.source_type = source_type if source_id is not None: self.source_id = source_id + self.source_type = source_type if source_label is not None: self.source_label = source_label if updated_by_user_id is not None: self.updated_by_user_id = updated_by_user_id + self.value = value + self.timestamp = timestamp @property - def value(self): - """Gets the value of this ValueWithTimestamp. # noqa: E501 + def source_id(self): + """Gets the source_id of this ValueWithTimestamp. # noqa: E501 - :return: The value of this ValueWithTimestamp. # noqa: E501 + :return: The source_id of this ValueWithTimestamp. # noqa: E501 :rtype: str """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this ValueWithTimestamp. - - - :param value: The value of this ValueWithTimestamp. # noqa: E501 - :type value: str - """ - if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - - self._value = value - - @property - def timestamp(self): - """Gets the timestamp of this ValueWithTimestamp. # noqa: E501 - - - :return: The timestamp of this ValueWithTimestamp. # noqa: E501 - :rtype: datetime - """ - return self._timestamp + return self._source_id - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this ValueWithTimestamp. + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this ValueWithTimestamp. - :param timestamp: The timestamp of this ValueWithTimestamp. # noqa: E501 - :type timestamp: datetime + :param source_id: The source_id of this ValueWithTimestamp. # noqa: E501 + :type source_id: str """ - if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 - raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 - self._timestamp = timestamp + self._source_id = source_id @property def source_type(self): @@ -132,27 +107,6 @@ def source_type(self, source_type): self._source_type = source_type - @property - def source_id(self): - """Gets the source_id of this ValueWithTimestamp. # noqa: E501 - - - :return: The source_id of this ValueWithTimestamp. # noqa: E501 - :rtype: str - """ - return self._source_id - - @source_id.setter - def source_id(self, source_id): - """Sets the source_id of this ValueWithTimestamp. - - - :param source_id: The source_id of this ValueWithTimestamp. # noqa: E501 - :type source_id: str - """ - - self._source_id = source_id - @property def source_label(self): """Gets the source_label of this ValueWithTimestamp. # noqa: E501 @@ -195,6 +149,52 @@ def updated_by_user_id(self, updated_by_user_id): self._updated_by_user_id = updated_by_user_id + @property + def value(self): + """Gets the value of this ValueWithTimestamp. # noqa: E501 + + + :return: The value of this ValueWithTimestamp. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ValueWithTimestamp. + + + :param value: The value of this ValueWithTimestamp. # noqa: E501 + :type value: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + @property + def timestamp(self): + """Gets the timestamp of this ValueWithTimestamp. # noqa: E501 + + + :return: The timestamp of this ValueWithTimestamp. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ValueWithTimestamp. + + + :param timestamp: The timestamp of this ValueWithTimestamp. # noqa: E501 + :type timestamp: datetime + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/__init__.py b/hubspot/crm/quotes/__init__.py index 11a2c8cf..d2e8bf1b 100644 --- a/hubspot/crm/quotes/__init__.py +++ b/hubspot/crm/quotes/__init__.py @@ -19,6 +19,7 @@ # import apis into sdk package from hubspot.crm.quotes.api.basic_api import BasicApi from hubspot.crm.quotes.api.batch_api import BatchApi +from hubspot.crm.quotes.api.gdpr_api import GDPRApi from hubspot.crm.quotes.api.public_object_api import PublicObjectApi from hubspot.crm.quotes.api.search_api import SearchApi @@ -53,6 +54,7 @@ from hubspot.crm.quotes.models.paging import Paging from hubspot.crm.quotes.models.previous_page import PreviousPage from hubspot.crm.quotes.models.public_associations_for_object import PublicAssociationsForObject +from hubspot.crm.quotes.models.public_gdpr_delete_input import PublicGdprDeleteInput from hubspot.crm.quotes.models.public_merge_input import PublicMergeInput from hubspot.crm.quotes.models.public_object_id import PublicObjectId from hubspot.crm.quotes.models.public_object_search_request import PublicObjectSearchRequest diff --git a/hubspot/crm/quotes/api/__init__.py b/hubspot/crm/quotes/api/__init__.py index bb7e4017..dc0aa217 100644 --- a/hubspot/crm/quotes/api/__init__.py +++ b/hubspot/crm/quotes/api/__init__.py @@ -5,5 +5,6 @@ # import apis into api package from hubspot.crm.quotes.api.basic_api import BasicApi from hubspot.crm.quotes.api.batch_api import BatchApi +from hubspot.crm.quotes.api.gdpr_api import GDPRApi from hubspot.crm.quotes.api.public_object_api import PublicObjectApi from hubspot.crm.quotes.api.search_api import SearchApi diff --git a/hubspot/crm/quotes/api/gdpr_api.py b/hubspot/crm/quotes/api/gdpr_api.py new file mode 100644 index 00000000..d44338e8 --- /dev/null +++ b/hubspot/crm/quotes/api/gdpr_api.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Quotes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v3 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from hubspot.crm.quotes.api_client import ApiClient +from hubspot.crm.quotes.exceptions import ApiTypeError, ApiValueError # noqa: F401 + + +class GDPRApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def purge(self, public_gdpr_delete_input, **kwargs): # noqa: E501 + """GDPR DELETE # noqa: E501 + + Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.purge(public_gdpr_delete_input, async_req=True) + >>> result = thread.get() + + :param public_gdpr_delete_input: (required) + :type public_gdpr_delete_input: PublicGdprDeleteInput + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs["_return_http_data_only"] = True + return self.purge_with_http_info(public_gdpr_delete_input, **kwargs) # noqa: E501 + + def purge_with_http_info(self, public_gdpr_delete_input, **kwargs): # noqa: E501 + """GDPR DELETE # noqa: E501 + + Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.purge_with_http_info(public_gdpr_delete_input, async_req=True) + >>> result = thread.get() + + :param public_gdpr_delete_input: (required) + :type public_gdpr_delete_input: PublicGdprDeleteInput + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + local_var_params = locals() + + all_params = ["public_gdpr_delete_input"] + all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"]) + + for key, val in six.iteritems(local_var_params["kwargs"]): + if key not in all_params: + raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method purge" % key) + local_var_params[key] = val + del local_var_params["kwargs"] + # verify the required parameter 'public_gdpr_delete_input' is set + if self.api_client.client_side_validation and local_var_params.get("public_gdpr_delete_input") is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `public_gdpr_delete_input` when calling `purge`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get("_headers", {})) + + form_params = [] + local_var_files = {} + + body_params = None + if "public_gdpr_delete_input" in local_var_params: + body_params = local_var_params["public_gdpr_delete_input"] + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "POST", body_params)) # noqa: E501 + if content_types_list: + header_params["Content-Type"] = content_types_list + + # Authentication setting + auth_settings = ["oauth2"] # noqa: E501 + + response_types_map = {} + + return self.api_client.call_api( + "/crm/v3/objects/quotes/gdpr-delete", + "POST", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get("async_req"), + _return_http_data_only=local_var_params.get("_return_http_data_only"), # noqa: E501 + _preload_content=local_var_params.get("_preload_content", True), + _request_timeout=local_var_params.get("_request_timeout"), + collection_formats=collection_formats, + _request_auth=local_var_params.get("_request_auth"), + ) diff --git a/hubspot/crm/quotes/models/__init__.py b/hubspot/crm/quotes/models/__init__.py index 90608d40..4508231a 100644 --- a/hubspot/crm/quotes/models/__init__.py +++ b/hubspot/crm/quotes/models/__init__.py @@ -34,6 +34,7 @@ from hubspot.crm.quotes.models.paging import Paging from hubspot.crm.quotes.models.previous_page import PreviousPage from hubspot.crm.quotes.models.public_associations_for_object import PublicAssociationsForObject +from hubspot.crm.quotes.models.public_gdpr_delete_input import PublicGdprDeleteInput from hubspot.crm.quotes.models.public_merge_input import PublicMergeInput from hubspot.crm.quotes.models.public_object_id import PublicObjectId from hubspot.crm.quotes.models.public_object_search_request import PublicObjectSearchRequest diff --git a/hubspot/crm/quotes/models/batch_read_input_simple_public_object_id.py b/hubspot/crm/quotes/models/batch_read_input_simple_public_object_id.py index e2f885d4..3bc77236 100644 --- a/hubspot/crm/quotes/models/batch_read_input_simple_public_object_id.py +++ b/hubspot/crm/quotes/models/batch_read_input_simple_public_object_id.py @@ -35,50 +35,27 @@ class BatchReadInputSimplePublicObjectId(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "list[str]", "properties_with_history": "list[str]", "id_property": "str", "inputs": "list[SimplePublicObjectId]"} + openapi_types = {"properties_with_history": "list[str]", "id_property": "str", "inputs": "list[SimplePublicObjectId]", "properties": "list[str]"} - attribute_map = {"properties": "properties", "properties_with_history": "propertiesWithHistory", "id_property": "idProperty", "inputs": "inputs"} + attribute_map = {"properties_with_history": "propertiesWithHistory", "id_property": "idProperty", "inputs": "inputs", "properties": "properties"} - def __init__(self, properties=None, properties_with_history=None, id_property=None, inputs=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, properties_with_history=None, id_property=None, inputs=None, properties=None, local_vars_configuration=None): # noqa: E501 """BatchReadInputSimplePublicObjectId - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None self._properties_with_history = None self._id_property = None self._inputs = None + self._properties = None self.discriminator = None - self.properties = properties self.properties_with_history = properties_with_history if id_property is not None: self.id_property = id_property self.inputs = inputs - - @property - def properties(self): - """Gets the properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - - - :return: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - :rtype: list[str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this BatchReadInputSimplePublicObjectId. - - - :param properties: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - :type properties: list[str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + self.properties = properties @property def properties_with_history(self): @@ -147,6 +124,29 @@ def inputs(self, inputs): self._inputs = inputs + @property + def properties(self): + """Gets the properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + + + :return: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + :rtype: list[str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this BatchReadInputSimplePublicObjectId. + + + :param properties: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + :type properties: list[str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/batch_response_simple_public_object.py b/hubspot/crm/quotes/models/batch_response_simple_public_object.py index de482918..51e4696f 100644 --- a/hubspot/crm/quotes/models/batch_response_simple_public_object.py +++ b/hubspot/crm/quotes/models/batch_response_simple_public_object.py @@ -35,81 +35,55 @@ class BatchResponseSimplePublicObject(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"status": "str", "results": "list[SimplePublicObject]", "requested_at": "datetime", "started_at": "datetime", "completed_at": "datetime", "links": "dict[str, str]"} + openapi_types = {"completed_at": "datetime", "requested_at": "datetime", "started_at": "datetime", "links": "dict[str, str]", "results": "list[SimplePublicObject]", "status": "str"} - attribute_map = {"status": "status", "results": "results", "requested_at": "requestedAt", "started_at": "startedAt", "completed_at": "completedAt", "links": "links"} + attribute_map = {"completed_at": "completedAt", "requested_at": "requestedAt", "started_at": "startedAt", "links": "links", "results": "results", "status": "status"} - def __init__(self, status=None, results=None, requested_at=None, started_at=None, completed_at=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, requested_at=None, started_at=None, links=None, results=None, status=None, local_vars_configuration=None): # noqa: E501 """BatchResponseSimplePublicObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None - self._results = None + self._completed_at = None self._requested_at = None self._started_at = None - self._completed_at = None self._links = None + self._results = None + self._status = None self.discriminator = None - self.status = status - self.results = results + self.completed_at = completed_at if requested_at is not None: self.requested_at = requested_at self.started_at = started_at - self.completed_at = completed_at if links is not None: self.links = links + self.results = results + self.status = status @property - def status(self): - """Gets the status of this BatchResponseSimplePublicObject. # noqa: E501 - - - :return: The status of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchResponseSimplePublicObject. - - - :param status: The status of this BatchResponseSimplePublicObject. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 - - self._status = status - - @property - def results(self): - """Gets the results of this BatchResponseSimplePublicObject. # noqa: E501 + def completed_at(self): + """Gets the completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :return: The results of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: list[SimplePublicObject] + :return: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: datetime """ - return self._results + return self._completed_at - @results.setter - def results(self, results): - """Sets the results of this BatchResponseSimplePublicObject. + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this BatchResponseSimplePublicObject. - :param results: The results of this BatchResponseSimplePublicObject. # noqa: E501 - :type results: list[SimplePublicObject] + :param completed_at: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 + :type completed_at: datetime """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 + raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - self._results = results + self._completed_at = completed_at @property def requested_at(self): @@ -155,29 +129,6 @@ def started_at(self, started_at): self._started_at = started_at - @property - def completed_at(self): - """Gets the completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - - - :return: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: datetime - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this BatchResponseSimplePublicObject. - - - :param completed_at: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :type completed_at: datetime - """ - if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 - raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - - self._completed_at = completed_at - @property def links(self): """Gets the links of this BatchResponseSimplePublicObject. # noqa: E501 @@ -199,6 +150,55 @@ def links(self, links): self._links = links + @property + def results(self): + """Gets the results of this BatchResponseSimplePublicObject. # noqa: E501 + + + :return: The results of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: list[SimplePublicObject] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchResponseSimplePublicObject. + + + :param results: The results of this BatchResponseSimplePublicObject. # noqa: E501 + :type results: list[SimplePublicObject] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + @property + def status(self): + """Gets the status of this BatchResponseSimplePublicObject. # noqa: E501 + + + :return: The status of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchResponseSimplePublicObject. + + + :param status: The status of this BatchResponseSimplePublicObject. # noqa: E501 + :type status: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 + + self._status = status + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/batch_response_simple_public_object_with_errors.py b/hubspot/crm/quotes/models/batch_response_simple_public_object_with_errors.py index 76c0d779..0e98c066 100644 --- a/hubspot/crm/quotes/models/batch_response_simple_public_object_with_errors.py +++ b/hubspot/crm/quotes/models/batch_response_simple_public_object_with_errors.py @@ -36,104 +36,78 @@ class BatchResponseSimplePublicObjectWithErrors(object): and the value is json key in definition. """ openapi_types = { - "status": "str", - "results": "list[SimplePublicObject]", + "completed_at": "datetime", "num_errors": "int", - "errors": "list[StandardError]", "requested_at": "datetime", "started_at": "datetime", - "completed_at": "datetime", "links": "dict[str, str]", + "results": "list[SimplePublicObject]", + "errors": "list[StandardError]", + "status": "str", } attribute_map = { - "status": "status", - "results": "results", + "completed_at": "completedAt", "num_errors": "numErrors", - "errors": "errors", "requested_at": "requestedAt", "started_at": "startedAt", - "completed_at": "completedAt", "links": "links", + "results": "results", + "errors": "errors", + "status": "status", } - def __init__(self, status=None, results=None, num_errors=None, errors=None, requested_at=None, started_at=None, completed_at=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, num_errors=None, requested_at=None, started_at=None, links=None, results=None, errors=None, status=None, local_vars_configuration=None): # noqa: E501 """BatchResponseSimplePublicObjectWithErrors - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None - self._results = None + self._completed_at = None self._num_errors = None - self._errors = None self._requested_at = None self._started_at = None - self._completed_at = None self._links = None + self._results = None + self._errors = None + self._status = None self.discriminator = None - self.status = status - self.results = results + self.completed_at = completed_at if num_errors is not None: self.num_errors = num_errors - if errors is not None: - self.errors = errors if requested_at is not None: self.requested_at = requested_at self.started_at = started_at - self.completed_at = completed_at if links is not None: self.links = links + self.results = results + if errors is not None: + self.errors = errors + self.status = status @property - def status(self): - """Gets the status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchResponseSimplePublicObjectWithErrors. - - - :param status: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 - - self._status = status - - @property - def results(self): - """Gets the results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + def completed_at(self): + """Gets the completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :return: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: list[SimplePublicObject] + :return: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: datetime """ - return self._results + return self._completed_at - @results.setter - def results(self, results): - """Sets the results of this BatchResponseSimplePublicObjectWithErrors. + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this BatchResponseSimplePublicObjectWithErrors. - :param results: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type results: list[SimplePublicObject] + :param completed_at: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type completed_at: datetime """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 + raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - self._results = results + self._completed_at = completed_at @property def num_errors(self): @@ -156,27 +130,6 @@ def num_errors(self, num_errors): self._num_errors = num_errors - @property - def errors(self): - """Gets the errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: list[StandardError] - """ - return self._errors - - @errors.setter - def errors(self, errors): - """Sets the errors of this BatchResponseSimplePublicObjectWithErrors. - - - :param errors: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type errors: list[StandardError] - """ - - self._errors = errors - @property def requested_at(self): """Gets the requested_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 @@ -221,29 +174,6 @@ def started_at(self, started_at): self._started_at = started_at - @property - def completed_at(self): - """Gets the completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: datetime - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this BatchResponseSimplePublicObjectWithErrors. - - - :param completed_at: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type completed_at: datetime - """ - if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 - raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - - self._completed_at = completed_at - @property def links(self): """Gets the links of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 @@ -265,6 +195,76 @@ def links(self, links): self._links = links + @property + def results(self): + """Gets the results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: list[SimplePublicObject] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchResponseSimplePublicObjectWithErrors. + + + :param results: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type results: list[SimplePublicObject] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + @property + def errors(self): + """Gets the errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: list[StandardError] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this BatchResponseSimplePublicObjectWithErrors. + + + :param errors: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type errors: list[StandardError] + """ + + self._errors = errors + + @property + def status(self): + """Gets the status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchResponseSimplePublicObjectWithErrors. + + + :param status: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type status: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 + + self._status = status + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/collection_response_associated_id.py b/hubspot/crm/quotes/models/collection_response_associated_id.py index 3510d474..93cfaeb8 100644 --- a/hubspot/crm/quotes/models/collection_response_associated_id.py +++ b/hubspot/crm/quotes/models/collection_response_associated_id.py @@ -35,23 +35,44 @@ class CollectionResponseAssociatedId(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"results": "list[AssociatedId]", "paging": "Paging"} + openapi_types = {"paging": "Paging", "results": "list[AssociatedId]"} - attribute_map = {"results": "results", "paging": "paging"} + attribute_map = {"paging": "paging", "results": "results"} - def __init__(self, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseAssociatedId - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._results = None self._paging = None + self._results = None self.discriminator = None - self.results = results if paging is not None: self.paging = paging + self.results = results + + @property + def paging(self): + """Gets the paging of this CollectionResponseAssociatedId. # noqa: E501 + + + :return: The paging of this CollectionResponseAssociatedId. # noqa: E501 + :rtype: Paging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseAssociatedId. + + + :param paging: The paging of this CollectionResponseAssociatedId. # noqa: E501 + :type paging: Paging + """ + + self._paging = paging @property def results(self): @@ -76,27 +97,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseAssociatedId. # noqa: E501 - - - :return: The paging of this CollectionResponseAssociatedId. # noqa: E501 - :rtype: Paging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseAssociatedId. - - - :param paging: The paging of this CollectionResponseAssociatedId. # noqa: E501 - :type paging: Paging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/collection_response_simple_public_object_with_associations_forward_paging.py b/hubspot/crm/quotes/models/collection_response_simple_public_object_with_associations_forward_paging.py index 25e2653e..8fab03d4 100644 --- a/hubspot/crm/quotes/models/collection_response_simple_public_object_with_associations_forward_paging.py +++ b/hubspot/crm/quotes/models/collection_response_simple_public_object_with_associations_forward_paging.py @@ -35,23 +35,44 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"results": "list[SimplePublicObjectWithAssociations]", "paging": "ForwardPaging"} + openapi_types = {"paging": "ForwardPaging", "results": "list[SimplePublicObjectWithAssociations]"} - attribute_map = {"results": "results", "paging": "paging"} + attribute_map = {"paging": "paging", "results": "results"} - def __init__(self, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseSimplePublicObjectWithAssociationsForwardPaging - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._results = None self._paging = None + self._results = None self.discriminator = None - self.results = results if paging is not None: self.paging = paging + self.results = results + + @property + def paging(self): + """Gets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + + + :return: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + :rtype: ForwardPaging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. + + + :param paging: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + :type paging: ForwardPaging + """ + + self._paging = paging @property def results(self): @@ -76,27 +97,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - - - :return: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - :rtype: ForwardPaging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. - - - :param paging: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - :type paging: ForwardPaging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/collection_response_with_total_simple_public_object_forward_paging.py b/hubspot/crm/quotes/models/collection_response_with_total_simple_public_object_forward_paging.py index 85f14f3a..cf89023c 100644 --- a/hubspot/crm/quotes/models/collection_response_with_total_simple_public_object_forward_paging.py +++ b/hubspot/crm/quotes/models/collection_response_with_total_simple_public_object_forward_paging.py @@ -35,25 +35,25 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"total": "int", "results": "list[SimplePublicObject]", "paging": "ForwardPaging"} + openapi_types = {"total": "int", "paging": "ForwardPaging", "results": "list[SimplePublicObject]"} - attribute_map = {"total": "total", "results": "results", "paging": "paging"} + attribute_map = {"total": "total", "paging": "paging", "results": "results"} - def __init__(self, total=None, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, total=None, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseWithTotalSimplePublicObjectForwardPaging - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._total = None - self._results = None self._paging = None + self._results = None self.discriminator = None self.total = total - self.results = results if paging is not None: self.paging = paging + self.results = results @property def total(self): @@ -78,6 +78,27 @@ def total(self, total): self._total = total + @property + def paging(self): + """Gets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + + + :return: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + :rtype: ForwardPaging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. + + + :param paging: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + :type paging: ForwardPaging + """ + + self._paging = paging + @property def results(self): """Gets the results of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 @@ -101,27 +122,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - - - :return: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - :rtype: ForwardPaging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. - - - :param paging: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - :type paging: ForwardPaging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/error.py b/hubspot/crm/quotes/models/error.py index f227a677..cffc0699 100644 --- a/hubspot/crm/quotes/models/error.py +++ b/hubspot/crm/quotes/models/error.py @@ -35,61 +35,82 @@ class Error(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"message": "str", "correlation_id": "str", "category": "str", "sub_category": "str", "errors": "list[ErrorDetail]", "context": "dict[str, list[str]]", "links": "dict[str, str]"} + openapi_types = {"sub_category": "str", "context": "dict[str, list[str]]", "correlation_id": "str", "links": "dict[str, str]", "message": "str", "category": "str", "errors": "list[ErrorDetail]"} - attribute_map = {"message": "message", "correlation_id": "correlationId", "category": "category", "sub_category": "subCategory", "errors": "errors", "context": "context", "links": "links"} + attribute_map = {"sub_category": "subCategory", "context": "context", "correlation_id": "correlationId", "links": "links", "message": "message", "category": "category", "errors": "errors"} - def __init__(self, message=None, correlation_id=None, category=None, sub_category=None, errors=None, context=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, context=None, correlation_id=None, links=None, message=None, category=None, errors=None, local_vars_configuration=None): # noqa: E501 """Error - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._message = None - self._correlation_id = None - self._category = None self._sub_category = None - self._errors = None self._context = None + self._correlation_id = None self._links = None + self._message = None + self._category = None + self._errors = None self.discriminator = None - self.message = message - self.correlation_id = correlation_id - self.category = category if sub_category is not None: self.sub_category = sub_category - if errors is not None: - self.errors = errors if context is not None: self.context = context + self.correlation_id = correlation_id if links is not None: self.links = links + self.message = message + self.category = category + if errors is not None: + self.errors = errors @property - def message(self): - """Gets the message of this Error. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this Error. # noqa: E501 - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The message of this Error. # noqa: E501 + :return: The sub_category of this Error. # noqa: E501 :rtype: str """ - return self._message + return self._sub_category - @message.setter - def message(self, message): - """Sets the message of this Error. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this Error. - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param message: The message of this Error. # noqa: E501 - :type message: str + :param sub_category: The sub_category of this Error. # noqa: E501 + :type sub_category: str """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - self._message = message + self._sub_category = sub_category + + @property + def context(self): + """Gets the context of this Error. # noqa: E501 + + Context about the error condition # noqa: E501 + + :return: The context of this Error. # noqa: E501 + :rtype: dict[str, list[str]] + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this Error. + + Context about the error condition # noqa: E501 + + :param context: The context of this Error. # noqa: E501 + :type context: dict[str, list[str]] + """ + + self._context = context @property def correlation_id(self): @@ -116,6 +137,54 @@ def correlation_id(self, correlation_id): self._correlation_id = correlation_id + @property + def links(self): + """Gets the links of this Error. # noqa: E501 + + A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 + + :return: The links of this Error. # noqa: E501 + :rtype: dict[str, str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this Error. + + A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 + + :param links: The links of this Error. # noqa: E501 + :type links: dict[str, str] + """ + + self._links = links + + @property + def message(self): + """Gets the message of this Error. # noqa: E501 + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :return: The message of this Error. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Error. + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :param message: The message of this Error. # noqa: E501 + :type message: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + @property def category(self): """Gets the category of this Error. # noqa: E501 @@ -141,29 +210,6 @@ def category(self, category): self._category = category - @property - def sub_category(self): - """Gets the sub_category of this Error. # noqa: E501 - - A specific category that contains more specific detail about the error # noqa: E501 - - :return: The sub_category of this Error. # noqa: E501 - :rtype: str - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this Error. - - A specific category that contains more specific detail about the error # noqa: E501 - - :param sub_category: The sub_category of this Error. # noqa: E501 - :type sub_category: str - """ - - self._sub_category = sub_category - @property def errors(self): """Gets the errors of this Error. # noqa: E501 @@ -187,52 +233,6 @@ def errors(self, errors): self._errors = errors - @property - def context(self): - """Gets the context of this Error. # noqa: E501 - - Context about the error condition # noqa: E501 - - :return: The context of this Error. # noqa: E501 - :rtype: dict[str, list[str]] - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this Error. - - Context about the error condition # noqa: E501 - - :param context: The context of this Error. # noqa: E501 - :type context: dict[str, list[str]] - """ - - self._context = context - - @property - def links(self): - """Gets the links of this Error. # noqa: E501 - - A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 - - :return: The links of this Error. # noqa: E501 - :rtype: dict[str, str] - """ - return self._links - - @links.setter - def links(self, links): - """Sets the links of this Error. - - A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 - - :param links: The links of this Error. # noqa: E501 - :type links: dict[str, str] - """ - - self._links = links - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/error_category.py b/hubspot/crm/quotes/models/error_category.py deleted file mode 100644 index e02d7107..00000000 --- a/hubspot/crm/quotes/models/error_category.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Quotes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from hubspot.crm.quotes.configuration import Configuration - - -class ErrorCategory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = {"name": "str", "http_status": "str"} - - attribute_map = {"name": "name", "http_status": "httpStatus"} - - def __init__(self, name=None, http_status=None, local_vars_configuration=None): # noqa: E501 - """ErrorCategory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._http_status = None - self.discriminator = None - - self.name = name - self.http_status = http_status - - @property - def name(self): - """Gets the name of this ErrorCategory. # noqa: E501 - - - :return: The name of this ErrorCategory. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ErrorCategory. - - - :param name: The name of this ErrorCategory. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def http_status(self): - """Gets the http_status of this ErrorCategory. # noqa: E501 - - - :return: The http_status of this ErrorCategory. # noqa: E501 - :rtype: str - """ - return self._http_status - - @http_status.setter - def http_status(self, http_status): - """Sets the http_status of this ErrorCategory. - - - :param http_status: The http_status of this ErrorCategory. # noqa: E501 - :type http_status: str - """ - if self.local_vars_configuration.client_side_validation and http_status is None: # noqa: E501 - raise ValueError("Invalid value for `http_status`, must not be `None`") # noqa: E501 - allowed_values = [ - "CONTINUE", - "SWITCHING_PROTOCOLS", - "PROCESSING", - "OK", - "CREATED", - "ACCEPTED", - "NON_AUTHORITATIVE_INFORMATION", - "NO_CONTENT", - "RESET_CONTENT", - "PARTIAL_CONTENT", - "MULTI_STATUS", - "ALREADY_REPORTED", - "IM_USED", - "MULTIPLE_CHOICES", - "MOVED_PERMANENTLY", - "FOUND", - "SEE_OTHER", - "NOT_MODIFIED", - "USE_PROXY", - "TEMPORARY_REDIRECT", - "PERMANENT_REDIRECT", - "BAD_REQUEST", - "UNAUTHORIZED", - "PAYMENT_REQUIRED", - "FORBIDDEN", - "NOT_FOUND", - "METHOD_NOT_ALLOWED", - "NOT_ACCEPTABLE", - "PROXY_AUTHENTICATION_REQUIRED", - "REQUEST_TIMEOUT", - "CONFLICT", - "GONE", - "LENGTH_REQUIRED", - "PRECONDITION_FAILED", - "REQUEST_ENTITY_TOO_LARGE", - "REQUEST_URI_TOO_LONG", - "UNSUPPORTED_MEDIA_TYPE", - "REQUESTED_RANGE_NOT_SATISFIABLE", - "EXPECTATION_FAILED", - "IM_A_TEAPOT", - "MISDIRECTED_REQUEST", - "UNPROCESSABLE_ENTITY", - "LOCKED", - "FAILED_DEPENDENCY", - "UPGRADE_REQUIRED", - "PRECONDITION_REQUIRED", - "TOO_MANY_REQUESTS", - "REQUEST_HEADERS_FIELDS_TOO_LARGE", - "INTERNAL_STALE_SERVICE_DISCOVERY", - "UNAVAILABLE_FOR_LEGAL_REASONS", - "MIGRATION_IN_PROGRESS", - "INTERNAL_SERVER_ERROR", - "NOT_IMPLEMENTED", - "BAD_GATEWAY", - "SERVICE_UNAVAILABLE", - "GATEWAY_TIMEOUT", - "HTTP_VERSION_NOT_SUPPORTED", - "VARIANT_ALSO_NEGOTIATES", - "INSUFFICIENT_STORAGE", - "LOOP_DETECTED", - "NOT_EXTENDED", - "NETWORK_AUTHENTICATION_REQUIRED", - ] # noqa: E501 - if self.local_vars_configuration.client_side_validation and http_status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `http_status` ({0}), must be one of {1}".format(http_status, allowed_values)) # noqa: E501 - - self._http_status = http_status - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map(lambda x: convert(x), value)) - elif isinstance(value, dict): - result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items())) - else: - result[attr] = convert(value) - - return result - - 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, ErrorCategory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ErrorCategory): - return True - - return self.to_dict() != other.to_dict() diff --git a/hubspot/crm/quotes/models/error_detail.py b/hubspot/crm/quotes/models/error_detail.py index a2f4d63b..b781659e 100644 --- a/hubspot/crm/quotes/models/error_detail.py +++ b/hubspot/crm/quotes/models/error_detail.py @@ -35,80 +35,55 @@ class ErrorDetail(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"message": "str", "_in": "str", "code": "str", "sub_category": "str", "context": "dict[str, list[str]]"} + openapi_types = {"sub_category": "str", "code": "str", "_in": "str", "context": "dict[str, list[str]]", "message": "str"} - attribute_map = {"message": "message", "_in": "in", "code": "code", "sub_category": "subCategory", "context": "context"} + attribute_map = {"sub_category": "subCategory", "code": "code", "_in": "in", "context": "context", "message": "message"} - def __init__(self, message=None, _in=None, code=None, sub_category=None, context=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, code=None, _in=None, context=None, message=None, local_vars_configuration=None): # noqa: E501 """ErrorDetail - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._message = None - self.__in = None - self._code = None self._sub_category = None + self._code = None + self.__in = None self._context = None + self._message = None self.discriminator = None - self.message = message - if _in is not None: - self._in = _in - if code is not None: - self.code = code if sub_category is not None: self.sub_category = sub_category + if code is not None: + self.code = code + if _in is not None: + self._in = _in if context is not None: self.context = context + self.message = message @property - def message(self): - """Gets the message of this ErrorDetail. # noqa: E501 - - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - - :return: The message of this ErrorDetail. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ErrorDetail. - - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - - :param message: The message of this ErrorDetail. # noqa: E501 - :type message: str - """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def _in(self): - """Gets the _in of this ErrorDetail. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this ErrorDetail. # noqa: E501 - The name of the field or parameter in which the error was found. # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The _in of this ErrorDetail. # noqa: E501 + :return: The sub_category of this ErrorDetail. # noqa: E501 :rtype: str """ - return self.__in + return self._sub_category - @_in.setter - def _in(self, _in): - """Sets the _in of this ErrorDetail. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this ErrorDetail. - The name of the field or parameter in which the error was found. # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param _in: The _in of this ErrorDetail. # noqa: E501 - :type _in: str + :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 + :type sub_category: str """ - self.__in = _in + self._sub_category = sub_category @property def code(self): @@ -134,27 +109,27 @@ def code(self, code): self._code = code @property - def sub_category(self): - """Gets the sub_category of this ErrorDetail. # noqa: E501 + def _in(self): + """Gets the _in of this ErrorDetail. # noqa: E501 - A specific category that contains more specific detail about the error # noqa: E501 + The name of the field or parameter in which the error was found. # noqa: E501 - :return: The sub_category of this ErrorDetail. # noqa: E501 + :return: The _in of this ErrorDetail. # noqa: E501 :rtype: str """ - return self._sub_category + return self.__in - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this ErrorDetail. + @_in.setter + def _in(self, _in): + """Sets the _in of this ErrorDetail. - A specific category that contains more specific detail about the error # noqa: E501 + The name of the field or parameter in which the error was found. # noqa: E501 - :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 - :type sub_category: str + :param _in: The _in of this ErrorDetail. # noqa: E501 + :type _in: str """ - self._sub_category = sub_category + self.__in = _in @property def context(self): @@ -179,6 +154,31 @@ def context(self, context): self._context = context + @property + def message(self): + """Gets the message of this ErrorDetail. # noqa: E501 + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :return: The message of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ErrorDetail. + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :param message: The message of this ErrorDetail. # noqa: E501 + :type message: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/filter.py b/hubspot/crm/quotes/models/filter.py index 7dccbd52..c4f1eb3e 100644 --- a/hubspot/crm/quotes/models/filter.py +++ b/hubspot/crm/quotes/models/filter.py @@ -35,73 +35,75 @@ class Filter(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"value": "str", "high_value": "str", "values": "list[str]", "property_name": "str", "operator": "str"} + openapi_types = {"high_value": "str", "property_name": "str", "values": "list[str]", "value": "str", "operator": "str"} - attribute_map = {"value": "value", "high_value": "highValue", "values": "values", "property_name": "propertyName", "operator": "operator"} + attribute_map = {"high_value": "highValue", "property_name": "propertyName", "values": "values", "value": "value", "operator": "operator"} - def __init__(self, value=None, high_value=None, values=None, property_name=None, operator=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, high_value=None, property_name=None, values=None, value=None, operator=None, local_vars_configuration=None): # noqa: E501 """Filter - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._value = None self._high_value = None - self._values = None self._property_name = None + self._values = None + self._value = None self._operator = None self.discriminator = None - if value is not None: - self.value = value if high_value is not None: self.high_value = high_value + self.property_name = property_name if values is not None: self.values = values - self.property_name = property_name + if value is not None: + self.value = value self.operator = operator @property - def value(self): - """Gets the value of this Filter. # noqa: E501 + def high_value(self): + """Gets the high_value of this Filter. # noqa: E501 - :return: The value of this Filter. # noqa: E501 + :return: The high_value of this Filter. # noqa: E501 :rtype: str """ - return self._value + return self._high_value - @value.setter - def value(self, value): - """Sets the value of this Filter. + @high_value.setter + def high_value(self, high_value): + """Sets the high_value of this Filter. - :param value: The value of this Filter. # noqa: E501 - :type value: str + :param high_value: The high_value of this Filter. # noqa: E501 + :type high_value: str """ - self._value = value + self._high_value = high_value @property - def high_value(self): - """Gets the high_value of this Filter. # noqa: E501 + def property_name(self): + """Gets the property_name of this Filter. # noqa: E501 - :return: The high_value of this Filter. # noqa: E501 + :return: The property_name of this Filter. # noqa: E501 :rtype: str """ - return self._high_value + return self._property_name - @high_value.setter - def high_value(self, high_value): - """Sets the high_value of this Filter. + @property_name.setter + def property_name(self, property_name): + """Sets the property_name of this Filter. - :param high_value: The high_value of this Filter. # noqa: E501 - :type high_value: str + :param property_name: The property_name of this Filter. # noqa: E501 + :type property_name: str """ + if self.local_vars_configuration.client_side_validation and property_name is None: # noqa: E501 + raise ValueError("Invalid value for `property_name`, must not be `None`") # noqa: E501 - self._high_value = high_value + self._property_name = property_name @property def values(self): @@ -125,27 +127,25 @@ def values(self, values): self._values = values @property - def property_name(self): - """Gets the property_name of this Filter. # noqa: E501 + def value(self): + """Gets the value of this Filter. # noqa: E501 - :return: The property_name of this Filter. # noqa: E501 + :return: The value of this Filter. # noqa: E501 :rtype: str """ - return self._property_name + return self._value - @property_name.setter - def property_name(self, property_name): - """Sets the property_name of this Filter. + @value.setter + def value(self, value): + """Sets the value of this Filter. - :param property_name: The property_name of this Filter. # noqa: E501 - :type property_name: str + :param value: The value of this Filter. # noqa: E501 + :type value: str """ - if self.local_vars_configuration.client_side_validation and property_name is None: # noqa: E501 - raise ValueError("Invalid value for `property_name`, must not be `None`") # noqa: E501 - self._property_name = property_name + self._value = value @property def operator(self): diff --git a/hubspot/crm/quotes/models/next_page.py b/hubspot/crm/quotes/models/next_page.py index 0ffb4b3b..422fc200 100644 --- a/hubspot/crm/quotes/models/next_page.py +++ b/hubspot/crm/quotes/models/next_page.py @@ -35,23 +35,44 @@ class NextPage(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"after": "str", "link": "str"} + openapi_types = {"link": "str", "after": "str"} - attribute_map = {"after": "after", "link": "link"} + attribute_map = {"link": "link", "after": "after"} - def __init__(self, after=None, link=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, link=None, after=None, local_vars_configuration=None): # noqa: E501 """NextPage - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._after = None self._link = None + self._after = None self.discriminator = None - self.after = after if link is not None: self.link = link + self.after = after + + @property + def link(self): + """Gets the link of this NextPage. # noqa: E501 + + + :return: The link of this NextPage. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this NextPage. + + + :param link: The link of this NextPage. # noqa: E501 + :type link: str + """ + + self._link = link @property def after(self): @@ -76,27 +97,6 @@ def after(self, after): self._after = after - @property - def link(self): - """Gets the link of this NextPage. # noqa: E501 - - - :return: The link of this NextPage. # noqa: E501 - :rtype: str - """ - return self._link - - @link.setter - def link(self, link): - """Sets the link of this NextPage. - - - :param link: The link of this NextPage. # noqa: E501 - :type link: str - """ - - self._link = link - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/public_associations_for_object.py b/hubspot/crm/quotes/models/public_associations_for_object.py index 5ef7bff0..4817c127 100644 --- a/hubspot/crm/quotes/models/public_associations_for_object.py +++ b/hubspot/crm/quotes/models/public_associations_for_object.py @@ -35,45 +35,22 @@ class PublicAssociationsForObject(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"to": "PublicObjectId", "types": "list[AssociationSpec]"} + openapi_types = {"types": "list[AssociationSpec]", "to": "PublicObjectId"} - attribute_map = {"to": "to", "types": "types"} + attribute_map = {"types": "types", "to": "to"} - def __init__(self, to=None, types=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, types=None, to=None, local_vars_configuration=None): # noqa: E501 """PublicAssociationsForObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._to = None self._types = None + self._to = None self.discriminator = None - self.to = to self.types = types - - @property - def to(self): - """Gets the to of this PublicAssociationsForObject. # noqa: E501 - - - :return: The to of this PublicAssociationsForObject. # noqa: E501 - :rtype: PublicObjectId - """ - return self._to - - @to.setter - def to(self, to): - """Sets the to of this PublicAssociationsForObject. - - - :param to: The to of this PublicAssociationsForObject. # noqa: E501 - :type to: PublicObjectId - """ - if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 - raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 - - self._to = to + self.to = to @property def types(self): @@ -98,6 +75,29 @@ def types(self, types): self._types = types + @property + def to(self): + """Gets the to of this PublicAssociationsForObject. # noqa: E501 + + + :return: The to of this PublicAssociationsForObject. # noqa: E501 + :rtype: PublicObjectId + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this PublicAssociationsForObject. + + + :param to: The to of this PublicAssociationsForObject. # noqa: E501 + :type to: PublicObjectId + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/public_gdpr_delete_input.py b/hubspot/crm/quotes/models/public_gdpr_delete_input.py new file mode 100644 index 00000000..a0fa350f --- /dev/null +++ b/hubspot/crm/quotes/models/public_gdpr_delete_input.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Quotes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v3 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from hubspot.crm.quotes.configuration import Configuration + + +class PublicGdprDeleteInput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"id_property": "str", "object_id": "str"} + + attribute_map = {"id_property": "idProperty", "object_id": "objectId"} + + def __init__(self, id_property=None, object_id=None, local_vars_configuration=None): # noqa: E501 + """PublicGdprDeleteInput - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._id_property = None + self._object_id = None + self.discriminator = None + + if id_property is not None: + self.id_property = id_property + self.object_id = object_id + + @property + def id_property(self): + """Gets the id_property of this PublicGdprDeleteInput. # noqa: E501 + + + :return: The id_property of this PublicGdprDeleteInput. # noqa: E501 + :rtype: str + """ + return self._id_property + + @id_property.setter + def id_property(self, id_property): + """Sets the id_property of this PublicGdprDeleteInput. + + + :param id_property: The id_property of this PublicGdprDeleteInput. # noqa: E501 + :type id_property: str + """ + + self._id_property = id_property + + @property + def object_id(self): + """Gets the object_id of this PublicGdprDeleteInput. # noqa: E501 + + + :return: The object_id of this PublicGdprDeleteInput. # noqa: E501 + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """Sets the object_id of this PublicGdprDeleteInput. + + + :param object_id: The object_id of this PublicGdprDeleteInput. # noqa: E501 + :type object_id: str + """ + if self.local_vars_configuration.client_side_validation and object_id is None: # noqa: E501 + raise ValueError("Invalid value for `object_id`, must not be `None`") # noqa: E501 + + self._object_id = object_id + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map(lambda x: convert(x), value)) + elif isinstance(value, dict): + result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items())) + else: + result[attr] = convert(value) + + return result + + 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, PublicGdprDeleteInput): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PublicGdprDeleteInput): + return True + + return self.to_dict() != other.to_dict() diff --git a/hubspot/crm/quotes/models/public_merge_input.py b/hubspot/crm/quotes/models/public_merge_input.py index 1ad0b2ff..5908802d 100644 --- a/hubspot/crm/quotes/models/public_merge_input.py +++ b/hubspot/crm/quotes/models/public_merge_input.py @@ -35,45 +35,22 @@ class PublicMergeInput(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"primary_object_id": "str", "object_id_to_merge": "str"} + openapi_types = {"object_id_to_merge": "str", "primary_object_id": "str"} - attribute_map = {"primary_object_id": "primaryObjectId", "object_id_to_merge": "objectIdToMerge"} + attribute_map = {"object_id_to_merge": "objectIdToMerge", "primary_object_id": "primaryObjectId"} - def __init__(self, primary_object_id=None, object_id_to_merge=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, object_id_to_merge=None, primary_object_id=None, local_vars_configuration=None): # noqa: E501 """PublicMergeInput - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._primary_object_id = None self._object_id_to_merge = None + self._primary_object_id = None self.discriminator = None - self.primary_object_id = primary_object_id self.object_id_to_merge = object_id_to_merge - - @property - def primary_object_id(self): - """Gets the primary_object_id of this PublicMergeInput. # noqa: E501 - - - :return: The primary_object_id of this PublicMergeInput. # noqa: E501 - :rtype: str - """ - return self._primary_object_id - - @primary_object_id.setter - def primary_object_id(self, primary_object_id): - """Sets the primary_object_id of this PublicMergeInput. - - - :param primary_object_id: The primary_object_id of this PublicMergeInput. # noqa: E501 - :type primary_object_id: str - """ - if self.local_vars_configuration.client_side_validation and primary_object_id is None: # noqa: E501 - raise ValueError("Invalid value for `primary_object_id`, must not be `None`") # noqa: E501 - - self._primary_object_id = primary_object_id + self.primary_object_id = primary_object_id @property def object_id_to_merge(self): @@ -98,6 +75,29 @@ def object_id_to_merge(self, object_id_to_merge): self._object_id_to_merge = object_id_to_merge + @property + def primary_object_id(self): + """Gets the primary_object_id of this PublicMergeInput. # noqa: E501 + + + :return: The primary_object_id of this PublicMergeInput. # noqa: E501 + :rtype: str + """ + return self._primary_object_id + + @primary_object_id.setter + def primary_object_id(self, primary_object_id): + """Sets the primary_object_id of this PublicMergeInput. + + + :param primary_object_id: The primary_object_id of this PublicMergeInput. # noqa: E501 + :type primary_object_id: str + """ + if self.local_vars_configuration.client_side_validation and primary_object_id is None: # noqa: E501 + raise ValueError("Invalid value for `primary_object_id`, must not be `None`") # noqa: E501 + + self._primary_object_id = primary_object_id + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/public_object_search_request.py b/hubspot/crm/quotes/models/public_object_search_request.py index 71c75b5f..ee934465 100644 --- a/hubspot/crm/quotes/models/public_object_search_request.py +++ b/hubspot/crm/quotes/models/public_object_search_request.py @@ -35,54 +35,98 @@ class PublicObjectSearchRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"filter_groups": "list[FilterGroup]", "sorts": "list[str]", "query": "str", "properties": "list[str]", "limit": "int", "after": "int"} + openapi_types = {"query": "str", "limit": "int", "after": "str", "sorts": "list[str]", "properties": "list[str]", "filter_groups": "list[FilterGroup]"} - attribute_map = {"filter_groups": "filterGroups", "sorts": "sorts", "query": "query", "properties": "properties", "limit": "limit", "after": "after"} + attribute_map = {"query": "query", "limit": "limit", "after": "after", "sorts": "sorts", "properties": "properties", "filter_groups": "filterGroups"} - def __init__(self, filter_groups=None, sorts=None, query=None, properties=None, limit=None, after=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, query=None, limit=None, after=None, sorts=None, properties=None, filter_groups=None, local_vars_configuration=None): # noqa: E501 """PublicObjectSearchRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._filter_groups = None - self._sorts = None self._query = None - self._properties = None self._limit = None self._after = None + self._sorts = None + self._properties = None + self._filter_groups = None self.discriminator = None - self.filter_groups = filter_groups - self.sorts = sorts if query is not None: self.query = query - self.properties = properties self.limit = limit self.after = after + self.sorts = sorts + self.properties = properties + self.filter_groups = filter_groups @property - def filter_groups(self): - """Gets the filter_groups of this PublicObjectSearchRequest. # noqa: E501 + def query(self): + """Gets the query of this PublicObjectSearchRequest. # noqa: E501 - :return: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :rtype: list[FilterGroup] + :return: The query of this PublicObjectSearchRequest. # noqa: E501 + :rtype: str """ - return self._filter_groups + return self._query - @filter_groups.setter - def filter_groups(self, filter_groups): - """Sets the filter_groups of this PublicObjectSearchRequest. + @query.setter + def query(self, query): + """Sets the query of this PublicObjectSearchRequest. - :param filter_groups: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :type filter_groups: list[FilterGroup] + :param query: The query of this PublicObjectSearchRequest. # noqa: E501 + :type query: str """ - if self.local_vars_configuration.client_side_validation and filter_groups is None: # noqa: E501 - raise ValueError("Invalid value for `filter_groups`, must not be `None`") # noqa: E501 - self._filter_groups = filter_groups + self._query = query + + @property + def limit(self): + """Gets the limit of this PublicObjectSearchRequest. # noqa: E501 + + + :return: The limit of this PublicObjectSearchRequest. # noqa: E501 + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this PublicObjectSearchRequest. + + + :param limit: The limit of this PublicObjectSearchRequest. # noqa: E501 + :type limit: int + """ + if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 + raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 + + self._limit = limit + + @property + def after(self): + """Gets the after of this PublicObjectSearchRequest. # noqa: E501 + + + :return: The after of this PublicObjectSearchRequest. # noqa: E501 + :rtype: str + """ + return self._after + + @after.setter + def after(self, after): + """Sets the after of this PublicObjectSearchRequest. + + + :param after: The after of this PublicObjectSearchRequest. # noqa: E501 + :type after: str + """ + if self.local_vars_configuration.client_side_validation and after is None: # noqa: E501 + raise ValueError("Invalid value for `after`, must not be `None`") # noqa: E501 + + self._after = after @property def sorts(self): @@ -107,27 +151,6 @@ def sorts(self, sorts): self._sorts = sorts - @property - def query(self): - """Gets the query of this PublicObjectSearchRequest. # noqa: E501 - - - :return: The query of this PublicObjectSearchRequest. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this PublicObjectSearchRequest. - - - :param query: The query of this PublicObjectSearchRequest. # noqa: E501 - :type query: str - """ - - self._query = query - @property def properties(self): """Gets the properties of this PublicObjectSearchRequest. # noqa: E501 @@ -152,50 +175,27 @@ def properties(self, properties): self._properties = properties @property - def limit(self): - """Gets the limit of this PublicObjectSearchRequest. # noqa: E501 - - - :return: The limit of this PublicObjectSearchRequest. # noqa: E501 - :rtype: int - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this PublicObjectSearchRequest. - - - :param limit: The limit of this PublicObjectSearchRequest. # noqa: E501 - :type limit: int - """ - if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 - raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 - - self._limit = limit - - @property - def after(self): - """Gets the after of this PublicObjectSearchRequest. # noqa: E501 + def filter_groups(self): + """Gets the filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :return: The after of this PublicObjectSearchRequest. # noqa: E501 - :rtype: int + :return: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 + :rtype: list[FilterGroup] """ - return self._after + return self._filter_groups - @after.setter - def after(self, after): - """Sets the after of this PublicObjectSearchRequest. + @filter_groups.setter + def filter_groups(self, filter_groups): + """Sets the filter_groups of this PublicObjectSearchRequest. - :param after: The after of this PublicObjectSearchRequest. # noqa: E501 - :type after: int + :param filter_groups: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 + :type filter_groups: list[FilterGroup] """ - if self.local_vars_configuration.client_side_validation and after is None: # noqa: E501 - raise ValueError("Invalid value for `after`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and filter_groups is None: # noqa: E501 + raise ValueError("Invalid value for `filter_groups`, must not be `None`") # noqa: E501 - self._after = after + self._filter_groups = filter_groups def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/quotes/models/simple_public_object.py b/hubspot/crm/quotes/models/simple_public_object.py index 8512e0de..d0b2be09 100644 --- a/hubspot/crm/quotes/models/simple_public_object.py +++ b/hubspot/crm/quotes/models/simple_public_object.py @@ -36,96 +36,115 @@ class SimplePublicObject(object): and the value is json key in definition. """ openapi_types = { - "id": "str", - "properties": "dict[str, str]", - "properties_with_history": "dict[str, list[ValueWithTimestamp]]", "created_at": "datetime", - "updated_at": "datetime", "archived": "bool", "archived_at": "datetime", + "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "id": "str", + "properties": "dict[str, str]", + "updated_at": "datetime", } attribute_map = { - "id": "id", - "properties": "properties", - "properties_with_history": "propertiesWithHistory", "created_at": "createdAt", - "updated_at": "updatedAt", "archived": "archived", "archived_at": "archivedAt", + "properties_with_history": "propertiesWithHistory", + "id": "id", + "properties": "properties", + "updated_at": "updatedAt", } - def __init__(self, id=None, properties=None, properties_with_history=None, created_at=None, updated_at=None, archived=None, archived_at=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, created_at=None, archived=None, archived_at=None, properties_with_history=None, id=None, properties=None, updated_at=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._id = None - self._properties = None - self._properties_with_history = None self._created_at = None - self._updated_at = None self._archived = None self._archived_at = None + self._properties_with_history = None + self._id = None + self._properties = None + self._updated_at = None self.discriminator = None - self.id = id - self.properties = properties - if properties_with_history is not None: - self.properties_with_history = properties_with_history self.created_at = created_at - self.updated_at = updated_at if archived is not None: self.archived = archived if archived_at is not None: self.archived_at = archived_at + if properties_with_history is not None: + self.properties_with_history = properties_with_history + self.id = id + self.properties = properties + self.updated_at = updated_at @property - def id(self): - """Gets the id of this SimplePublicObject. # noqa: E501 + def created_at(self): + """Gets the created_at of this SimplePublicObject. # noqa: E501 - :return: The id of this SimplePublicObject. # noqa: E501 - :rtype: str + :return: The created_at of this SimplePublicObject. # noqa: E501 + :rtype: datetime """ - return self._id + return self._created_at - @id.setter - def id(self, id): - """Sets the id of this SimplePublicObject. + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SimplePublicObject. - :param id: The id of this SimplePublicObject. # noqa: E501 - :type id: str + :param created_at: The created_at of this SimplePublicObject. # noqa: E501 + :type created_at: datetime """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 - self._id = id + self._created_at = created_at @property - def properties(self): - """Gets the properties of this SimplePublicObject. # noqa: E501 + def archived(self): + """Gets the archived of this SimplePublicObject. # noqa: E501 - :return: The properties of this SimplePublicObject. # noqa: E501 - :rtype: dict[str, str] + :return: The archived of this SimplePublicObject. # noqa: E501 + :rtype: bool """ - return self._properties + return self._archived - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObject. + @archived.setter + def archived(self, archived): + """Sets the archived of this SimplePublicObject. - :param properties: The properties of this SimplePublicObject. # noqa: E501 - :type properties: dict[str, str] + :param archived: The archived of this SimplePublicObject. # noqa: E501 + :type archived: bool """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - self._properties = properties + self._archived = archived + + @property + def archived_at(self): + """Gets the archived_at of this SimplePublicObject. # noqa: E501 + + + :return: The archived_at of this SimplePublicObject. # noqa: E501 + :rtype: datetime + """ + return self._archived_at + + @archived_at.setter + def archived_at(self, archived_at): + """Sets the archived_at of this SimplePublicObject. + + + :param archived_at: The archived_at of this SimplePublicObject. # noqa: E501 + :type archived_at: datetime + """ + + self._archived_at = archived_at @property def properties_with_history(self): @@ -149,27 +168,50 @@ def properties_with_history(self, properties_with_history): self._properties_with_history = properties_with_history @property - def created_at(self): - """Gets the created_at of this SimplePublicObject. # noqa: E501 + def id(self): + """Gets the id of this SimplePublicObject. # noqa: E501 - :return: The created_at of this SimplePublicObject. # noqa: E501 - :rtype: datetime + :return: The id of this SimplePublicObject. # noqa: E501 + :rtype: str """ - return self._created_at + return self._id - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this SimplePublicObject. + @id.setter + def id(self, id): + """Sets the id of this SimplePublicObject. - :param created_at: The created_at of this SimplePublicObject. # noqa: E501 - :type created_at: datetime + :param id: The id of this SimplePublicObject. # noqa: E501 + :type id: str """ - if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 - raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._created_at = created_at + self._id = id + + @property + def properties(self): + """Gets the properties of this SimplePublicObject. # noqa: E501 + + + :return: The properties of this SimplePublicObject. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObject. + + + :param properties: The properties of this SimplePublicObject. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties @property def updated_at(self): @@ -194,48 +236,6 @@ def updated_at(self, updated_at): self._updated_at = updated_at - @property - def archived(self): - """Gets the archived of this SimplePublicObject. # noqa: E501 - - - :return: The archived of this SimplePublicObject. # noqa: E501 - :rtype: bool - """ - return self._archived - - @archived.setter - def archived(self, archived): - """Sets the archived of this SimplePublicObject. - - - :param archived: The archived of this SimplePublicObject. # noqa: E501 - :type archived: bool - """ - - self._archived = archived - - @property - def archived_at(self): - """Gets the archived_at of this SimplePublicObject. # noqa: E501 - - - :return: The archived_at of this SimplePublicObject. # noqa: E501 - :rtype: datetime - """ - return self._archived_at - - @archived_at.setter - def archived_at(self, archived_at): - """Sets the archived_at of this SimplePublicObject. - - - :param archived_at: The archived_at of this SimplePublicObject. # noqa: E501 - :type archived_at: datetime - """ - - self._archived_at = archived_at - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/simple_public_object_batch_input.py b/hubspot/crm/quotes/models/simple_public_object_batch_input.py index 39bb5f45..167c941c 100644 --- a/hubspot/crm/quotes/models/simple_public_object_batch_input.py +++ b/hubspot/crm/quotes/models/simple_public_object_batch_input.py @@ -35,45 +35,46 @@ class SimplePublicObjectBatchInput(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "dict[str, str]", "id": "str"} + openapi_types = {"id_property": "str", "id": "str", "properties": "dict[str, str]"} - attribute_map = {"properties": "properties", "id": "id"} + attribute_map = {"id_property": "idProperty", "id": "id", "properties": "properties"} - def __init__(self, properties=None, id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id_property=None, id=None, properties=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObjectBatchInput - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None + self._id_property = None self._id = None + self._properties = None self.discriminator = None - self.properties = properties + if id_property is not None: + self.id_property = id_property self.id = id + self.properties = properties @property - def properties(self): - """Gets the properties of this SimplePublicObjectBatchInput. # noqa: E501 + def id_property(self): + """Gets the id_property of this SimplePublicObjectBatchInput. # noqa: E501 - :return: The properties of this SimplePublicObjectBatchInput. # noqa: E501 - :rtype: dict[str, str] + :return: The id_property of this SimplePublicObjectBatchInput. # noqa: E501 + :rtype: str """ - return self._properties + return self._id_property - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectBatchInput. + @id_property.setter + def id_property(self, id_property): + """Sets the id_property of this SimplePublicObjectBatchInput. - :param properties: The properties of this SimplePublicObjectBatchInput. # noqa: E501 - :type properties: dict[str, str] + :param id_property: The id_property of this SimplePublicObjectBatchInput. # noqa: E501 + :type id_property: str """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - self._properties = properties + self._id_property = id_property @property def id(self): @@ -98,6 +99,29 @@ def id(self, id): self._id = id + @property + def properties(self): + """Gets the properties of this SimplePublicObjectBatchInput. # noqa: E501 + + + :return: The properties of this SimplePublicObjectBatchInput. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectBatchInput. + + + :param properties: The properties of this SimplePublicObjectBatchInput. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/simple_public_object_input_for_create.py b/hubspot/crm/quotes/models/simple_public_object_input_for_create.py index 54ee1c7d..22625711 100644 --- a/hubspot/crm/quotes/models/simple_public_object_input_for_create.py +++ b/hubspot/crm/quotes/models/simple_public_object_input_for_create.py @@ -35,45 +35,22 @@ class SimplePublicObjectInputForCreate(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "dict[str, str]", "associations": "list[PublicAssociationsForObject]"} + openapi_types = {"associations": "list[PublicAssociationsForObject]", "properties": "dict[str, str]"} - attribute_map = {"properties": "properties", "associations": "associations"} + attribute_map = {"associations": "associations", "properties": "properties"} - def __init__(self, properties=None, associations=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, associations=None, properties=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObjectInputForCreate - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None self._associations = None + self._properties = None self.discriminator = None - self.properties = properties self.associations = associations - - @property - def properties(self): - """Gets the properties of this SimplePublicObjectInputForCreate. # noqa: E501 - - - :return: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 - :rtype: dict[str, str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectInputForCreate. - - - :param properties: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 - :type properties: dict[str, str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + self.properties = properties @property def associations(self): @@ -98,6 +75,29 @@ def associations(self, associations): self._associations = associations + @property + def properties(self): + """Gets the properties of this SimplePublicObjectInputForCreate. # noqa: E501 + + + :return: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectInputForCreate. + + + :param properties: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/quotes/models/simple_public_object_with_associations.py b/hubspot/crm/quotes/models/simple_public_object_with_associations.py index 2ede30a0..4a9ffd80 100644 --- a/hubspot/crm/quotes/models/simple_public_object_with_associations.py +++ b/hubspot/crm/quotes/models/simple_public_object_with_associations.py @@ -36,124 +36,78 @@ class SimplePublicObjectWithAssociations(object): and the value is json key in definition. """ openapi_types = { - "id": "str", - "properties": "dict[str, str]", - "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "associations": "dict[str, CollectionResponseAssociatedId]", "created_at": "datetime", - "updated_at": "datetime", "archived": "bool", "archived_at": "datetime", - "associations": "dict[str, CollectionResponseAssociatedId]", + "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "id": "str", + "properties": "dict[str, str]", + "updated_at": "datetime", } attribute_map = { - "id": "id", - "properties": "properties", - "properties_with_history": "propertiesWithHistory", + "associations": "associations", "created_at": "createdAt", - "updated_at": "updatedAt", "archived": "archived", "archived_at": "archivedAt", - "associations": "associations", + "properties_with_history": "propertiesWithHistory", + "id": "id", + "properties": "properties", + "updated_at": "updatedAt", } def __init__( - self, id=None, properties=None, properties_with_history=None, created_at=None, updated_at=None, archived=None, archived_at=None, associations=None, local_vars_configuration=None + self, associations=None, created_at=None, archived=None, archived_at=None, properties_with_history=None, id=None, properties=None, updated_at=None, local_vars_configuration=None ): # noqa: E501 """SimplePublicObjectWithAssociations - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._id = None - self._properties = None - self._properties_with_history = None + self._associations = None self._created_at = None - self._updated_at = None self._archived = None self._archived_at = None - self._associations = None + self._properties_with_history = None + self._id = None + self._properties = None + self._updated_at = None self.discriminator = None - self.id = id - self.properties = properties - if properties_with_history is not None: - self.properties_with_history = properties_with_history + if associations is not None: + self.associations = associations self.created_at = created_at - self.updated_at = updated_at if archived is not None: self.archived = archived if archived_at is not None: self.archived_at = archived_at - if associations is not None: - self.associations = associations - - @property - def id(self): - """Gets the id of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The id of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this SimplePublicObjectWithAssociations. - - - :param id: The id of this SimplePublicObjectWithAssociations. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def properties(self): - """Gets the properties of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectWithAssociations. - - - :param properties: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 - :type properties: dict[str, str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + if properties_with_history is not None: + self.properties_with_history = properties_with_history + self.id = id + self.properties = properties + self.updated_at = updated_at @property - def properties_with_history(self): - """Gets the properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + def associations(self): + """Gets the associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :return: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, list[ValueWithTimestamp]] + :return: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, CollectionResponseAssociatedId] """ - return self._properties_with_history + return self._associations - @properties_with_history.setter - def properties_with_history(self, properties_with_history): - """Sets the properties_with_history of this SimplePublicObjectWithAssociations. + @associations.setter + def associations(self, associations): + """Sets the associations of this SimplePublicObjectWithAssociations. - :param properties_with_history: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :type properties_with_history: dict[str, list[ValueWithTimestamp]] + :param associations: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 + :type associations: dict[str, CollectionResponseAssociatedId] """ - self._properties_with_history = properties_with_history + self._associations = associations @property def created_at(self): @@ -178,29 +132,6 @@ def created_at(self, created_at): self._created_at = created_at - @property - def updated_at(self): - """Gets the updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: datetime - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this SimplePublicObjectWithAssociations. - - - :param updated_at: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - :type updated_at: datetime - """ - if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 - raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 - - self._updated_at = updated_at - @property def archived(self): """Gets the archived of this SimplePublicObjectWithAssociations. # noqa: E501 @@ -244,25 +175,94 @@ def archived_at(self, archived_at): self._archived_at = archived_at @property - def associations(self): - """Gets the associations of this SimplePublicObjectWithAssociations. # noqa: E501 + def properties_with_history(self): + """Gets the properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :return: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, CollectionResponseAssociatedId] + :return: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, list[ValueWithTimestamp]] """ - return self._associations + return self._properties_with_history - @associations.setter - def associations(self, associations): - """Sets the associations of this SimplePublicObjectWithAssociations. + @properties_with_history.setter + def properties_with_history(self, properties_with_history): + """Sets the properties_with_history of this SimplePublicObjectWithAssociations. - :param associations: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :type associations: dict[str, CollectionResponseAssociatedId] + :param properties_with_history: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + :type properties_with_history: dict[str, list[ValueWithTimestamp]] """ - self._associations = associations + self._properties_with_history = properties_with_history + + @property + def id(self): + """Gets the id of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The id of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SimplePublicObjectWithAssociations. + + + :param id: The id of this SimplePublicObjectWithAssociations. # noqa: E501 + :type id: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def properties(self): + """Gets the properties of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectWithAssociations. + + + :param properties: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + + @property + def updated_at(self): + """Gets the updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this SimplePublicObjectWithAssociations. + + + :param updated_at: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + :type updated_at: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/quotes/models/standard_error.py b/hubspot/crm/quotes/models/standard_error.py index d229b0c4..a08cdc6c 100644 --- a/hubspot/crm/quotes/models/standard_error.py +++ b/hubspot/crm/quotes/models/standard_error.py @@ -36,67 +36,111 @@ class StandardError(object): and the value is json key in definition. """ openapi_types = { - "status": "str", + "sub_category": "object", + "context": "dict[str, list[str]]", + "links": "dict[str, str]", "id": "str", "category": "str", - "sub_category": "object", "message": "str", "errors": "list[ErrorDetail]", - "context": "dict[str, list[str]]", - "links": "dict[str, str]", + "status": "str", } - attribute_map = {"status": "status", "id": "id", "category": "category", "sub_category": "subCategory", "message": "message", "errors": "errors", "context": "context", "links": "links"} + attribute_map = {"sub_category": "subCategory", "context": "context", "links": "links", "id": "id", "category": "category", "message": "message", "errors": "errors", "status": "status"} - def __init__(self, status=None, id=None, category=None, sub_category=None, message=None, errors=None, context=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, context=None, links=None, id=None, category=None, message=None, errors=None, status=None, local_vars_configuration=None): # noqa: E501 """StandardError - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None + self._sub_category = None + self._context = None + self._links = None self._id = None self._category = None - self._sub_category = None self._message = None self._errors = None - self._context = None - self._links = None + self._status = None self.discriminator = None - self.status = status + if sub_category is not None: + self.sub_category = sub_category + self.context = context + self.links = links if id is not None: self.id = id self.category = category - if sub_category is not None: - self.sub_category = sub_category self.message = message self.errors = errors - self.context = context - self.links = links + self.status = status @property - def status(self): - """Gets the status of this StandardError. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this StandardError. # noqa: E501 - :return: The status of this StandardError. # noqa: E501 - :rtype: str + :return: The sub_category of this StandardError. # noqa: E501 + :rtype: object """ - return self._status + return self._sub_category - @status.setter - def status(self, status): - """Sets the status of this StandardError. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this StandardError. - :param status: The status of this StandardError. # noqa: E501 - :type status: str + :param sub_category: The sub_category of this StandardError. # noqa: E501 + :type sub_category: object """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._status = status + self._sub_category = sub_category + + @property + def context(self): + """Gets the context of this StandardError. # noqa: E501 + + + :return: The context of this StandardError. # noqa: E501 + :rtype: dict[str, list[str]] + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this StandardError. + + + :param context: The context of this StandardError. # noqa: E501 + :type context: dict[str, list[str]] + """ + if self.local_vars_configuration.client_side_validation and context is None: # noqa: E501 + raise ValueError("Invalid value for `context`, must not be `None`") # noqa: E501 + + self._context = context + + @property + def links(self): + """Gets the links of this StandardError. # noqa: E501 + + + :return: The links of this StandardError. # noqa: E501 + :rtype: dict[str, str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this StandardError. + + + :param links: The links of this StandardError. # noqa: E501 + :type links: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 + raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + + self._links = links @property def id(self): @@ -142,27 +186,6 @@ def category(self, category): self._category = category - @property - def sub_category(self): - """Gets the sub_category of this StandardError. # noqa: E501 - - - :return: The sub_category of this StandardError. # noqa: E501 - :rtype: object - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this StandardError. - - - :param sub_category: The sub_category of this StandardError. # noqa: E501 - :type sub_category: object - """ - - self._sub_category = sub_category - @property def message(self): """Gets the message of this StandardError. # noqa: E501 @@ -210,50 +233,27 @@ def errors(self, errors): self._errors = errors @property - def context(self): - """Gets the context of this StandardError. # noqa: E501 - - - :return: The context of this StandardError. # noqa: E501 - :rtype: dict[str, list[str]] - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this StandardError. - - - :param context: The context of this StandardError. # noqa: E501 - :type context: dict[str, list[str]] - """ - if self.local_vars_configuration.client_side_validation and context is None: # noqa: E501 - raise ValueError("Invalid value for `context`, must not be `None`") # noqa: E501 - - self._context = context - - @property - def links(self): - """Gets the links of this StandardError. # noqa: E501 + def status(self): + """Gets the status of this StandardError. # noqa: E501 - :return: The links of this StandardError. # noqa: E501 - :rtype: dict[str, str] + :return: The status of this StandardError. # noqa: E501 + :rtype: str """ - return self._links + return self._status - @links.setter - def links(self, links): - """Sets the links of this StandardError. + @status.setter + def status(self, status): + """Sets the status of this StandardError. - :param links: The links of this StandardError. # noqa: E501 - :type links: dict[str, str] + :param status: The status of this StandardError. # noqa: E501 + :type status: str """ - if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 - raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._links = links + self._status = status def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/quotes/models/value_with_timestamp.py b/hubspot/crm/quotes/models/value_with_timestamp.py index 6d1acbe0..b45d0cbc 100644 --- a/hubspot/crm/quotes/models/value_with_timestamp.py +++ b/hubspot/crm/quotes/models/value_with_timestamp.py @@ -35,79 +35,54 @@ class ValueWithTimestamp(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"value": "str", "timestamp": "datetime", "source_type": "str", "source_id": "str", "source_label": "str", "updated_by_user_id": "int"} + openapi_types = {"source_id": "str", "source_type": "str", "source_label": "str", "updated_by_user_id": "int", "value": "str", "timestamp": "datetime"} - attribute_map = {"value": "value", "timestamp": "timestamp", "source_type": "sourceType", "source_id": "sourceId", "source_label": "sourceLabel", "updated_by_user_id": "updatedByUserId"} + attribute_map = {"source_id": "sourceId", "source_type": "sourceType", "source_label": "sourceLabel", "updated_by_user_id": "updatedByUserId", "value": "value", "timestamp": "timestamp"} - def __init__(self, value=None, timestamp=None, source_type=None, source_id=None, source_label=None, updated_by_user_id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, source_id=None, source_type=None, source_label=None, updated_by_user_id=None, value=None, timestamp=None, local_vars_configuration=None): # noqa: E501 """ValueWithTimestamp - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._value = None - self._timestamp = None - self._source_type = None self._source_id = None + self._source_type = None self._source_label = None self._updated_by_user_id = None + self._value = None + self._timestamp = None self.discriminator = None - self.value = value - self.timestamp = timestamp - self.source_type = source_type if source_id is not None: self.source_id = source_id + self.source_type = source_type if source_label is not None: self.source_label = source_label if updated_by_user_id is not None: self.updated_by_user_id = updated_by_user_id + self.value = value + self.timestamp = timestamp @property - def value(self): - """Gets the value of this ValueWithTimestamp. # noqa: E501 + def source_id(self): + """Gets the source_id of this ValueWithTimestamp. # noqa: E501 - :return: The value of this ValueWithTimestamp. # noqa: E501 + :return: The source_id of this ValueWithTimestamp. # noqa: E501 :rtype: str """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this ValueWithTimestamp. - - - :param value: The value of this ValueWithTimestamp. # noqa: E501 - :type value: str - """ - if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - - self._value = value - - @property - def timestamp(self): - """Gets the timestamp of this ValueWithTimestamp. # noqa: E501 - - - :return: The timestamp of this ValueWithTimestamp. # noqa: E501 - :rtype: datetime - """ - return self._timestamp + return self._source_id - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this ValueWithTimestamp. + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this ValueWithTimestamp. - :param timestamp: The timestamp of this ValueWithTimestamp. # noqa: E501 - :type timestamp: datetime + :param source_id: The source_id of this ValueWithTimestamp. # noqa: E501 + :type source_id: str """ - if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 - raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 - self._timestamp = timestamp + self._source_id = source_id @property def source_type(self): @@ -132,27 +107,6 @@ def source_type(self, source_type): self._source_type = source_type - @property - def source_id(self): - """Gets the source_id of this ValueWithTimestamp. # noqa: E501 - - - :return: The source_id of this ValueWithTimestamp. # noqa: E501 - :rtype: str - """ - return self._source_id - - @source_id.setter - def source_id(self, source_id): - """Sets the source_id of this ValueWithTimestamp. - - - :param source_id: The source_id of this ValueWithTimestamp. # noqa: E501 - :type source_id: str - """ - - self._source_id = source_id - @property def source_label(self): """Gets the source_label of this ValueWithTimestamp. # noqa: E501 @@ -195,6 +149,52 @@ def updated_by_user_id(self, updated_by_user_id): self._updated_by_user_id = updated_by_user_id + @property + def value(self): + """Gets the value of this ValueWithTimestamp. # noqa: E501 + + + :return: The value of this ValueWithTimestamp. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ValueWithTimestamp. + + + :param value: The value of this ValueWithTimestamp. # noqa: E501 + :type value: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + @property + def timestamp(self): + """Gets the timestamp of this ValueWithTimestamp. # noqa: E501 + + + :return: The timestamp of this ValueWithTimestamp. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ValueWithTimestamp. + + + :param timestamp: The timestamp of this ValueWithTimestamp. # noqa: E501 + :type timestamp: datetime + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/__init__.py b/hubspot/crm/tickets/__init__.py index 24c2151c..7ea74969 100644 --- a/hubspot/crm/tickets/__init__.py +++ b/hubspot/crm/tickets/__init__.py @@ -19,6 +19,7 @@ # import apis into sdk package from hubspot.crm.tickets.api.basic_api import BasicApi from hubspot.crm.tickets.api.batch_api import BatchApi +from hubspot.crm.tickets.api.gdpr_api import GDPRApi from hubspot.crm.tickets.api.public_object_api import PublicObjectApi from hubspot.crm.tickets.api.search_api import SearchApi @@ -53,6 +54,7 @@ from hubspot.crm.tickets.models.paging import Paging from hubspot.crm.tickets.models.previous_page import PreviousPage from hubspot.crm.tickets.models.public_associations_for_object import PublicAssociationsForObject +from hubspot.crm.tickets.models.public_gdpr_delete_input import PublicGdprDeleteInput from hubspot.crm.tickets.models.public_merge_input import PublicMergeInput from hubspot.crm.tickets.models.public_object_id import PublicObjectId from hubspot.crm.tickets.models.public_object_search_request import PublicObjectSearchRequest diff --git a/hubspot/crm/tickets/api/__init__.py b/hubspot/crm/tickets/api/__init__.py index bc51ccc2..00147702 100644 --- a/hubspot/crm/tickets/api/__init__.py +++ b/hubspot/crm/tickets/api/__init__.py @@ -5,5 +5,6 @@ # import apis into api package from hubspot.crm.tickets.api.basic_api import BasicApi from hubspot.crm.tickets.api.batch_api import BatchApi +from hubspot.crm.tickets.api.gdpr_api import GDPRApi from hubspot.crm.tickets.api.public_object_api import PublicObjectApi from hubspot.crm.tickets.api.search_api import SearchApi diff --git a/hubspot/crm/tickets/api/gdpr_api.py b/hubspot/crm/tickets/api/gdpr_api.py new file mode 100644 index 00000000..01f7f1be --- /dev/null +++ b/hubspot/crm/tickets/api/gdpr_api.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Tickets + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v3 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from hubspot.crm.tickets.api_client import ApiClient +from hubspot.crm.tickets.exceptions import ApiTypeError, ApiValueError # noqa: F401 + + +class GDPRApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def purge(self, public_gdpr_delete_input, **kwargs): # noqa: E501 + """GDPR DELETE # noqa: E501 + + Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.purge(public_gdpr_delete_input, async_req=True) + >>> result = thread.get() + + :param public_gdpr_delete_input: (required) + :type public_gdpr_delete_input: PublicGdprDeleteInput + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs["_return_http_data_only"] = True + return self.purge_with_http_info(public_gdpr_delete_input, **kwargs) # noqa: E501 + + def purge_with_http_info(self, public_gdpr_delete_input, **kwargs): # noqa: E501 + """GDPR DELETE # noqa: E501 + + Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.purge_with_http_info(public_gdpr_delete_input, async_req=True) + >>> result = thread.get() + + :param public_gdpr_delete_input: (required) + :type public_gdpr_delete_input: PublicGdprDeleteInput + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + local_var_params = locals() + + all_params = ["public_gdpr_delete_input"] + all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"]) + + for key, val in six.iteritems(local_var_params["kwargs"]): + if key not in all_params: + raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method purge" % key) + local_var_params[key] = val + del local_var_params["kwargs"] + # verify the required parameter 'public_gdpr_delete_input' is set + if self.api_client.client_side_validation and local_var_params.get("public_gdpr_delete_input") is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `public_gdpr_delete_input` when calling `purge`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get("_headers", {})) + + form_params = [] + local_var_files = {} + + body_params = None + if "public_gdpr_delete_input" in local_var_params: + body_params = local_var_params["public_gdpr_delete_input"] + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "POST", body_params)) # noqa: E501 + if content_types_list: + header_params["Content-Type"] = content_types_list + + # Authentication setting + auth_settings = ["oauth2"] # noqa: E501 + + response_types_map = {} + + return self.api_client.call_api( + "/crm/v3/objects/tickets/gdpr-delete", + "POST", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get("async_req"), + _return_http_data_only=local_var_params.get("_return_http_data_only"), # noqa: E501 + _preload_content=local_var_params.get("_preload_content", True), + _request_timeout=local_var_params.get("_request_timeout"), + collection_formats=collection_formats, + _request_auth=local_var_params.get("_request_auth"), + ) diff --git a/hubspot/crm/tickets/models/__init__.py b/hubspot/crm/tickets/models/__init__.py index d0999f69..cff57c6b 100644 --- a/hubspot/crm/tickets/models/__init__.py +++ b/hubspot/crm/tickets/models/__init__.py @@ -34,6 +34,7 @@ from hubspot.crm.tickets.models.paging import Paging from hubspot.crm.tickets.models.previous_page import PreviousPage from hubspot.crm.tickets.models.public_associations_for_object import PublicAssociationsForObject +from hubspot.crm.tickets.models.public_gdpr_delete_input import PublicGdprDeleteInput from hubspot.crm.tickets.models.public_merge_input import PublicMergeInput from hubspot.crm.tickets.models.public_object_id import PublicObjectId from hubspot.crm.tickets.models.public_object_search_request import PublicObjectSearchRequest diff --git a/hubspot/crm/tickets/models/batch_read_input_simple_public_object_id.py b/hubspot/crm/tickets/models/batch_read_input_simple_public_object_id.py index 12fa1c62..56dcffc3 100644 --- a/hubspot/crm/tickets/models/batch_read_input_simple_public_object_id.py +++ b/hubspot/crm/tickets/models/batch_read_input_simple_public_object_id.py @@ -35,50 +35,27 @@ class BatchReadInputSimplePublicObjectId(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "list[str]", "properties_with_history": "list[str]", "id_property": "str", "inputs": "list[SimplePublicObjectId]"} + openapi_types = {"properties_with_history": "list[str]", "id_property": "str", "inputs": "list[SimplePublicObjectId]", "properties": "list[str]"} - attribute_map = {"properties": "properties", "properties_with_history": "propertiesWithHistory", "id_property": "idProperty", "inputs": "inputs"} + attribute_map = {"properties_with_history": "propertiesWithHistory", "id_property": "idProperty", "inputs": "inputs", "properties": "properties"} - def __init__(self, properties=None, properties_with_history=None, id_property=None, inputs=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, properties_with_history=None, id_property=None, inputs=None, properties=None, local_vars_configuration=None): # noqa: E501 """BatchReadInputSimplePublicObjectId - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None self._properties_with_history = None self._id_property = None self._inputs = None + self._properties = None self.discriminator = None - self.properties = properties self.properties_with_history = properties_with_history if id_property is not None: self.id_property = id_property self.inputs = inputs - - @property - def properties(self): - """Gets the properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - - - :return: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - :rtype: list[str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this BatchReadInputSimplePublicObjectId. - - - :param properties: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 - :type properties: list[str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + self.properties = properties @property def properties_with_history(self): @@ -147,6 +124,29 @@ def inputs(self, inputs): self._inputs = inputs + @property + def properties(self): + """Gets the properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + + + :return: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + :rtype: list[str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this BatchReadInputSimplePublicObjectId. + + + :param properties: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501 + :type properties: list[str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/batch_response_simple_public_object.py b/hubspot/crm/tickets/models/batch_response_simple_public_object.py index b4317093..13dc76f0 100644 --- a/hubspot/crm/tickets/models/batch_response_simple_public_object.py +++ b/hubspot/crm/tickets/models/batch_response_simple_public_object.py @@ -35,81 +35,55 @@ class BatchResponseSimplePublicObject(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"status": "str", "results": "list[SimplePublicObject]", "requested_at": "datetime", "started_at": "datetime", "completed_at": "datetime", "links": "dict[str, str]"} + openapi_types = {"completed_at": "datetime", "requested_at": "datetime", "started_at": "datetime", "links": "dict[str, str]", "results": "list[SimplePublicObject]", "status": "str"} - attribute_map = {"status": "status", "results": "results", "requested_at": "requestedAt", "started_at": "startedAt", "completed_at": "completedAt", "links": "links"} + attribute_map = {"completed_at": "completedAt", "requested_at": "requestedAt", "started_at": "startedAt", "links": "links", "results": "results", "status": "status"} - def __init__(self, status=None, results=None, requested_at=None, started_at=None, completed_at=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, requested_at=None, started_at=None, links=None, results=None, status=None, local_vars_configuration=None): # noqa: E501 """BatchResponseSimplePublicObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None - self._results = None + self._completed_at = None self._requested_at = None self._started_at = None - self._completed_at = None self._links = None + self._results = None + self._status = None self.discriminator = None - self.status = status - self.results = results + self.completed_at = completed_at if requested_at is not None: self.requested_at = requested_at self.started_at = started_at - self.completed_at = completed_at if links is not None: self.links = links + self.results = results + self.status = status @property - def status(self): - """Gets the status of this BatchResponseSimplePublicObject. # noqa: E501 - - - :return: The status of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchResponseSimplePublicObject. - - - :param status: The status of this BatchResponseSimplePublicObject. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 - - self._status = status - - @property - def results(self): - """Gets the results of this BatchResponseSimplePublicObject. # noqa: E501 + def completed_at(self): + """Gets the completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :return: The results of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: list[SimplePublicObject] + :return: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: datetime """ - return self._results + return self._completed_at - @results.setter - def results(self, results): - """Sets the results of this BatchResponseSimplePublicObject. + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this BatchResponseSimplePublicObject. - :param results: The results of this BatchResponseSimplePublicObject. # noqa: E501 - :type results: list[SimplePublicObject] + :param completed_at: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 + :type completed_at: datetime """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 + raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - self._results = results + self._completed_at = completed_at @property def requested_at(self): @@ -155,29 +129,6 @@ def started_at(self, started_at): self._started_at = started_at - @property - def completed_at(self): - """Gets the completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - - - :return: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :rtype: datetime - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this BatchResponseSimplePublicObject. - - - :param completed_at: The completed_at of this BatchResponseSimplePublicObject. # noqa: E501 - :type completed_at: datetime - """ - if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 - raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - - self._completed_at = completed_at - @property def links(self): """Gets the links of this BatchResponseSimplePublicObject. # noqa: E501 @@ -199,6 +150,55 @@ def links(self, links): self._links = links + @property + def results(self): + """Gets the results of this BatchResponseSimplePublicObject. # noqa: E501 + + + :return: The results of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: list[SimplePublicObject] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchResponseSimplePublicObject. + + + :param results: The results of this BatchResponseSimplePublicObject. # noqa: E501 + :type results: list[SimplePublicObject] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + @property + def status(self): + """Gets the status of this BatchResponseSimplePublicObject. # noqa: E501 + + + :return: The status of this BatchResponseSimplePublicObject. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchResponseSimplePublicObject. + + + :param status: The status of this BatchResponseSimplePublicObject. # noqa: E501 + :type status: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 + + self._status = status + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/batch_response_simple_public_object_with_errors.py b/hubspot/crm/tickets/models/batch_response_simple_public_object_with_errors.py index e6ffbe38..76b39588 100644 --- a/hubspot/crm/tickets/models/batch_response_simple_public_object_with_errors.py +++ b/hubspot/crm/tickets/models/batch_response_simple_public_object_with_errors.py @@ -36,104 +36,78 @@ class BatchResponseSimplePublicObjectWithErrors(object): and the value is json key in definition. """ openapi_types = { - "status": "str", - "results": "list[SimplePublicObject]", + "completed_at": "datetime", "num_errors": "int", - "errors": "list[StandardError]", "requested_at": "datetime", "started_at": "datetime", - "completed_at": "datetime", "links": "dict[str, str]", + "results": "list[SimplePublicObject]", + "errors": "list[StandardError]", + "status": "str", } attribute_map = { - "status": "status", - "results": "results", + "completed_at": "completedAt", "num_errors": "numErrors", - "errors": "errors", "requested_at": "requestedAt", "started_at": "startedAt", - "completed_at": "completedAt", "links": "links", + "results": "results", + "errors": "errors", + "status": "status", } - def __init__(self, status=None, results=None, num_errors=None, errors=None, requested_at=None, started_at=None, completed_at=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, num_errors=None, requested_at=None, started_at=None, links=None, results=None, errors=None, status=None, local_vars_configuration=None): # noqa: E501 """BatchResponseSimplePublicObjectWithErrors - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None - self._results = None + self._completed_at = None self._num_errors = None - self._errors = None self._requested_at = None self._started_at = None - self._completed_at = None self._links = None + self._results = None + self._errors = None + self._status = None self.discriminator = None - self.status = status - self.results = results + self.completed_at = completed_at if num_errors is not None: self.num_errors = num_errors - if errors is not None: - self.errors = errors if requested_at is not None: self.requested_at = requested_at self.started_at = started_at - self.completed_at = completed_at if links is not None: self.links = links + self.results = results + if errors is not None: + self.errors = errors + self.status = status @property - def status(self): - """Gets the status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchResponseSimplePublicObjectWithErrors. - - - :param status: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 - - self._status = status - - @property - def results(self): - """Gets the results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + def completed_at(self): + """Gets the completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :return: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: list[SimplePublicObject] + :return: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: datetime """ - return self._results + return self._completed_at - @results.setter - def results(self, results): - """Sets the results of this BatchResponseSimplePublicObjectWithErrors. + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this BatchResponseSimplePublicObjectWithErrors. - :param results: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type results: list[SimplePublicObject] + :param completed_at: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type completed_at: datetime """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 + raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - self._results = results + self._completed_at = completed_at @property def num_errors(self): @@ -156,27 +130,6 @@ def num_errors(self, num_errors): self._num_errors = num_errors - @property - def errors(self): - """Gets the errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: list[StandardError] - """ - return self._errors - - @errors.setter - def errors(self, errors): - """Sets the errors of this BatchResponseSimplePublicObjectWithErrors. - - - :param errors: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type errors: list[StandardError] - """ - - self._errors = errors - @property def requested_at(self): """Gets the requested_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 @@ -221,29 +174,6 @@ def started_at(self, started_at): self._started_at = started_at - @property - def completed_at(self): - """Gets the completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - - - :return: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :rtype: datetime - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this BatchResponseSimplePublicObjectWithErrors. - - - :param completed_at: The completed_at of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 - :type completed_at: datetime - """ - if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 - raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - - self._completed_at = completed_at - @property def links(self): """Gets the links of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 @@ -265,6 +195,76 @@ def links(self, links): self._links = links + @property + def results(self): + """Gets the results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: list[SimplePublicObject] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchResponseSimplePublicObjectWithErrors. + + + :param results: The results of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type results: list[SimplePublicObject] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + @property + def errors(self): + """Gets the errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: list[StandardError] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this BatchResponseSimplePublicObjectWithErrors. + + + :param errors: The errors of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type errors: list[StandardError] + """ + + self._errors = errors + + @property + def status(self): + """Gets the status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + + + :return: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchResponseSimplePublicObjectWithErrors. + + + :param status: The status of this BatchResponseSimplePublicObjectWithErrors. # noqa: E501 + :type status: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 + + self._status = status + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/collection_response_associated_id.py b/hubspot/crm/tickets/models/collection_response_associated_id.py index 357a6426..02436faf 100644 --- a/hubspot/crm/tickets/models/collection_response_associated_id.py +++ b/hubspot/crm/tickets/models/collection_response_associated_id.py @@ -35,23 +35,44 @@ class CollectionResponseAssociatedId(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"results": "list[AssociatedId]", "paging": "Paging"} + openapi_types = {"paging": "Paging", "results": "list[AssociatedId]"} - attribute_map = {"results": "results", "paging": "paging"} + attribute_map = {"paging": "paging", "results": "results"} - def __init__(self, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseAssociatedId - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._results = None self._paging = None + self._results = None self.discriminator = None - self.results = results if paging is not None: self.paging = paging + self.results = results + + @property + def paging(self): + """Gets the paging of this CollectionResponseAssociatedId. # noqa: E501 + + + :return: The paging of this CollectionResponseAssociatedId. # noqa: E501 + :rtype: Paging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseAssociatedId. + + + :param paging: The paging of this CollectionResponseAssociatedId. # noqa: E501 + :type paging: Paging + """ + + self._paging = paging @property def results(self): @@ -76,27 +97,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseAssociatedId. # noqa: E501 - - - :return: The paging of this CollectionResponseAssociatedId. # noqa: E501 - :rtype: Paging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseAssociatedId. - - - :param paging: The paging of this CollectionResponseAssociatedId. # noqa: E501 - :type paging: Paging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/collection_response_simple_public_object_with_associations_forward_paging.py b/hubspot/crm/tickets/models/collection_response_simple_public_object_with_associations_forward_paging.py index a366826f..8289a218 100644 --- a/hubspot/crm/tickets/models/collection_response_simple_public_object_with_associations_forward_paging.py +++ b/hubspot/crm/tickets/models/collection_response_simple_public_object_with_associations_forward_paging.py @@ -35,23 +35,44 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"results": "list[SimplePublicObjectWithAssociations]", "paging": "ForwardPaging"} + openapi_types = {"paging": "ForwardPaging", "results": "list[SimplePublicObjectWithAssociations]"} - attribute_map = {"results": "results", "paging": "paging"} + attribute_map = {"paging": "paging", "results": "results"} - def __init__(self, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseSimplePublicObjectWithAssociationsForwardPaging - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._results = None self._paging = None + self._results = None self.discriminator = None - self.results = results if paging is not None: self.paging = paging + self.results = results + + @property + def paging(self): + """Gets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + + + :return: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + :rtype: ForwardPaging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. + + + :param paging: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 + :type paging: ForwardPaging + """ + + self._paging = paging @property def results(self): @@ -76,27 +97,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - - - :return: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - :rtype: ForwardPaging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. - - - :param paging: The paging of this CollectionResponseSimplePublicObjectWithAssociationsForwardPaging. # noqa: E501 - :type paging: ForwardPaging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/collection_response_with_total_simple_public_object_forward_paging.py b/hubspot/crm/tickets/models/collection_response_with_total_simple_public_object_forward_paging.py index 0bb85530..ea35f4d3 100644 --- a/hubspot/crm/tickets/models/collection_response_with_total_simple_public_object_forward_paging.py +++ b/hubspot/crm/tickets/models/collection_response_with_total_simple_public_object_forward_paging.py @@ -35,25 +35,25 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"total": "int", "results": "list[SimplePublicObject]", "paging": "ForwardPaging"} + openapi_types = {"total": "int", "paging": "ForwardPaging", "results": "list[SimplePublicObject]"} - attribute_map = {"total": "total", "results": "results", "paging": "paging"} + attribute_map = {"total": "total", "paging": "paging", "results": "results"} - def __init__(self, total=None, results=None, paging=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, total=None, paging=None, results=None, local_vars_configuration=None): # noqa: E501 """CollectionResponseWithTotalSimplePublicObjectForwardPaging - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._total = None - self._results = None self._paging = None + self._results = None self.discriminator = None self.total = total - self.results = results if paging is not None: self.paging = paging + self.results = results @property def total(self): @@ -78,6 +78,27 @@ def total(self, total): self._total = total + @property + def paging(self): + """Gets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + + + :return: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + :rtype: ForwardPaging + """ + return self._paging + + @paging.setter + def paging(self, paging): + """Sets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. + + + :param paging: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 + :type paging: ForwardPaging + """ + + self._paging = paging + @property def results(self): """Gets the results of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 @@ -101,27 +122,6 @@ def results(self, results): self._results = results - @property - def paging(self): - """Gets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - - - :return: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - :rtype: ForwardPaging - """ - return self._paging - - @paging.setter - def paging(self, paging): - """Sets the paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. - - - :param paging: The paging of this CollectionResponseWithTotalSimplePublicObjectForwardPaging. # noqa: E501 - :type paging: ForwardPaging - """ - - self._paging = paging - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/error.py b/hubspot/crm/tickets/models/error.py index 3a9873ae..5c4a80c1 100644 --- a/hubspot/crm/tickets/models/error.py +++ b/hubspot/crm/tickets/models/error.py @@ -35,61 +35,82 @@ class Error(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"message": "str", "correlation_id": "str", "category": "str", "sub_category": "str", "errors": "list[ErrorDetail]", "context": "dict[str, list[str]]", "links": "dict[str, str]"} + openapi_types = {"sub_category": "str", "context": "dict[str, list[str]]", "correlation_id": "str", "links": "dict[str, str]", "message": "str", "category": "str", "errors": "list[ErrorDetail]"} - attribute_map = {"message": "message", "correlation_id": "correlationId", "category": "category", "sub_category": "subCategory", "errors": "errors", "context": "context", "links": "links"} + attribute_map = {"sub_category": "subCategory", "context": "context", "correlation_id": "correlationId", "links": "links", "message": "message", "category": "category", "errors": "errors"} - def __init__(self, message=None, correlation_id=None, category=None, sub_category=None, errors=None, context=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, context=None, correlation_id=None, links=None, message=None, category=None, errors=None, local_vars_configuration=None): # noqa: E501 """Error - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._message = None - self._correlation_id = None - self._category = None self._sub_category = None - self._errors = None self._context = None + self._correlation_id = None self._links = None + self._message = None + self._category = None + self._errors = None self.discriminator = None - self.message = message - self.correlation_id = correlation_id - self.category = category if sub_category is not None: self.sub_category = sub_category - if errors is not None: - self.errors = errors if context is not None: self.context = context + self.correlation_id = correlation_id if links is not None: self.links = links + self.message = message + self.category = category + if errors is not None: + self.errors = errors @property - def message(self): - """Gets the message of this Error. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this Error. # noqa: E501 - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The message of this Error. # noqa: E501 + :return: The sub_category of this Error. # noqa: E501 :rtype: str """ - return self._message + return self._sub_category - @message.setter - def message(self, message): - """Sets the message of this Error. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this Error. - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param message: The message of this Error. # noqa: E501 - :type message: str + :param sub_category: The sub_category of this Error. # noqa: E501 + :type sub_category: str """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - self._message = message + self._sub_category = sub_category + + @property + def context(self): + """Gets the context of this Error. # noqa: E501 + + Context about the error condition # noqa: E501 + + :return: The context of this Error. # noqa: E501 + :rtype: dict[str, list[str]] + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this Error. + + Context about the error condition # noqa: E501 + + :param context: The context of this Error. # noqa: E501 + :type context: dict[str, list[str]] + """ + + self._context = context @property def correlation_id(self): @@ -116,6 +137,54 @@ def correlation_id(self, correlation_id): self._correlation_id = correlation_id + @property + def links(self): + """Gets the links of this Error. # noqa: E501 + + A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 + + :return: The links of this Error. # noqa: E501 + :rtype: dict[str, str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this Error. + + A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 + + :param links: The links of this Error. # noqa: E501 + :type links: dict[str, str] + """ + + self._links = links + + @property + def message(self): + """Gets the message of this Error. # noqa: E501 + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :return: The message of this Error. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Error. + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :param message: The message of this Error. # noqa: E501 + :type message: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + @property def category(self): """Gets the category of this Error. # noqa: E501 @@ -141,29 +210,6 @@ def category(self, category): self._category = category - @property - def sub_category(self): - """Gets the sub_category of this Error. # noqa: E501 - - A specific category that contains more specific detail about the error # noqa: E501 - - :return: The sub_category of this Error. # noqa: E501 - :rtype: str - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this Error. - - A specific category that contains more specific detail about the error # noqa: E501 - - :param sub_category: The sub_category of this Error. # noqa: E501 - :type sub_category: str - """ - - self._sub_category = sub_category - @property def errors(self): """Gets the errors of this Error. # noqa: E501 @@ -187,52 +233,6 @@ def errors(self, errors): self._errors = errors - @property - def context(self): - """Gets the context of this Error. # noqa: E501 - - Context about the error condition # noqa: E501 - - :return: The context of this Error. # noqa: E501 - :rtype: dict[str, list[str]] - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this Error. - - Context about the error condition # noqa: E501 - - :param context: The context of this Error. # noqa: E501 - :type context: dict[str, list[str]] - """ - - self._context = context - - @property - def links(self): - """Gets the links of this Error. # noqa: E501 - - A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 - - :return: The links of this Error. # noqa: E501 - :rtype: dict[str, str] - """ - return self._links - - @links.setter - def links(self, links): - """Sets the links of this Error. - - A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 - - :param links: The links of this Error. # noqa: E501 - :type links: dict[str, str] - """ - - self._links = links - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/error_category.py b/hubspot/crm/tickets/models/error_category.py deleted file mode 100644 index c9244e1f..00000000 --- a/hubspot/crm/tickets/models/error_category.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Tickets - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from hubspot.crm.tickets.configuration import Configuration - - -class ErrorCategory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = {"name": "str", "http_status": "str"} - - attribute_map = {"name": "name", "http_status": "httpStatus"} - - def __init__(self, name=None, http_status=None, local_vars_configuration=None): # noqa: E501 - """ErrorCategory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._http_status = None - self.discriminator = None - - self.name = name - self.http_status = http_status - - @property - def name(self): - """Gets the name of this ErrorCategory. # noqa: E501 - - - :return: The name of this ErrorCategory. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ErrorCategory. - - - :param name: The name of this ErrorCategory. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def http_status(self): - """Gets the http_status of this ErrorCategory. # noqa: E501 - - - :return: The http_status of this ErrorCategory. # noqa: E501 - :rtype: str - """ - return self._http_status - - @http_status.setter - def http_status(self, http_status): - """Sets the http_status of this ErrorCategory. - - - :param http_status: The http_status of this ErrorCategory. # noqa: E501 - :type http_status: str - """ - if self.local_vars_configuration.client_side_validation and http_status is None: # noqa: E501 - raise ValueError("Invalid value for `http_status`, must not be `None`") # noqa: E501 - allowed_values = [ - "CONTINUE", - "SWITCHING_PROTOCOLS", - "PROCESSING", - "OK", - "CREATED", - "ACCEPTED", - "NON_AUTHORITATIVE_INFORMATION", - "NO_CONTENT", - "RESET_CONTENT", - "PARTIAL_CONTENT", - "MULTI_STATUS", - "ALREADY_REPORTED", - "IM_USED", - "MULTIPLE_CHOICES", - "MOVED_PERMANENTLY", - "FOUND", - "SEE_OTHER", - "NOT_MODIFIED", - "USE_PROXY", - "TEMPORARY_REDIRECT", - "PERMANENT_REDIRECT", - "BAD_REQUEST", - "UNAUTHORIZED", - "PAYMENT_REQUIRED", - "FORBIDDEN", - "NOT_FOUND", - "METHOD_NOT_ALLOWED", - "NOT_ACCEPTABLE", - "PROXY_AUTHENTICATION_REQUIRED", - "REQUEST_TIMEOUT", - "CONFLICT", - "GONE", - "LENGTH_REQUIRED", - "PRECONDITION_FAILED", - "REQUEST_ENTITY_TOO_LARGE", - "REQUEST_URI_TOO_LONG", - "UNSUPPORTED_MEDIA_TYPE", - "REQUESTED_RANGE_NOT_SATISFIABLE", - "EXPECTATION_FAILED", - "IM_A_TEAPOT", - "MISDIRECTED_REQUEST", - "UNPROCESSABLE_ENTITY", - "LOCKED", - "FAILED_DEPENDENCY", - "UPGRADE_REQUIRED", - "PRECONDITION_REQUIRED", - "TOO_MANY_REQUESTS", - "REQUEST_HEADERS_FIELDS_TOO_LARGE", - "INTERNAL_STALE_SERVICE_DISCOVERY", - "UNAVAILABLE_FOR_LEGAL_REASONS", - "MIGRATION_IN_PROGRESS", - "INTERNAL_SERVER_ERROR", - "NOT_IMPLEMENTED", - "BAD_GATEWAY", - "SERVICE_UNAVAILABLE", - "GATEWAY_TIMEOUT", - "HTTP_VERSION_NOT_SUPPORTED", - "VARIANT_ALSO_NEGOTIATES", - "INSUFFICIENT_STORAGE", - "LOOP_DETECTED", - "NOT_EXTENDED", - "NETWORK_AUTHENTICATION_REQUIRED", - ] # noqa: E501 - if self.local_vars_configuration.client_side_validation and http_status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `http_status` ({0}), must be one of {1}".format(http_status, allowed_values)) # noqa: E501 - - self._http_status = http_status - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map(lambda x: convert(x), value)) - elif isinstance(value, dict): - result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items())) - else: - result[attr] = convert(value) - - return result - - 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, ErrorCategory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ErrorCategory): - return True - - return self.to_dict() != other.to_dict() diff --git a/hubspot/crm/tickets/models/error_detail.py b/hubspot/crm/tickets/models/error_detail.py index b711b03f..644fd5a6 100644 --- a/hubspot/crm/tickets/models/error_detail.py +++ b/hubspot/crm/tickets/models/error_detail.py @@ -35,80 +35,55 @@ class ErrorDetail(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"message": "str", "_in": "str", "code": "str", "sub_category": "str", "context": "dict[str, list[str]]"} + openapi_types = {"sub_category": "str", "code": "str", "_in": "str", "context": "dict[str, list[str]]", "message": "str"} - attribute_map = {"message": "message", "_in": "in", "code": "code", "sub_category": "subCategory", "context": "context"} + attribute_map = {"sub_category": "subCategory", "code": "code", "_in": "in", "context": "context", "message": "message"} - def __init__(self, message=None, _in=None, code=None, sub_category=None, context=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, code=None, _in=None, context=None, message=None, local_vars_configuration=None): # noqa: E501 """ErrorDetail - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._message = None - self.__in = None - self._code = None self._sub_category = None + self._code = None + self.__in = None self._context = None + self._message = None self.discriminator = None - self.message = message - if _in is not None: - self._in = _in - if code is not None: - self.code = code if sub_category is not None: self.sub_category = sub_category + if code is not None: + self.code = code + if _in is not None: + self._in = _in if context is not None: self.context = context + self.message = message @property - def message(self): - """Gets the message of this ErrorDetail. # noqa: E501 - - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - - :return: The message of this ErrorDetail. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ErrorDetail. - - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - - :param message: The message of this ErrorDetail. # noqa: E501 - :type message: str - """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def _in(self): - """Gets the _in of this ErrorDetail. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this ErrorDetail. # noqa: E501 - The name of the field or parameter in which the error was found. # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The _in of this ErrorDetail. # noqa: E501 + :return: The sub_category of this ErrorDetail. # noqa: E501 :rtype: str """ - return self.__in + return self._sub_category - @_in.setter - def _in(self, _in): - """Sets the _in of this ErrorDetail. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this ErrorDetail. - The name of the field or parameter in which the error was found. # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param _in: The _in of this ErrorDetail. # noqa: E501 - :type _in: str + :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 + :type sub_category: str """ - self.__in = _in + self._sub_category = sub_category @property def code(self): @@ -134,27 +109,27 @@ def code(self, code): self._code = code @property - def sub_category(self): - """Gets the sub_category of this ErrorDetail. # noqa: E501 + def _in(self): + """Gets the _in of this ErrorDetail. # noqa: E501 - A specific category that contains more specific detail about the error # noqa: E501 + The name of the field or parameter in which the error was found. # noqa: E501 - :return: The sub_category of this ErrorDetail. # noqa: E501 + :return: The _in of this ErrorDetail. # noqa: E501 :rtype: str """ - return self._sub_category + return self.__in - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this ErrorDetail. + @_in.setter + def _in(self, _in): + """Sets the _in of this ErrorDetail. - A specific category that contains more specific detail about the error # noqa: E501 + The name of the field or parameter in which the error was found. # noqa: E501 - :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 - :type sub_category: str + :param _in: The _in of this ErrorDetail. # noqa: E501 + :type _in: str """ - self._sub_category = sub_category + self.__in = _in @property def context(self): @@ -179,6 +154,31 @@ def context(self, context): self._context = context + @property + def message(self): + """Gets the message of this ErrorDetail. # noqa: E501 + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :return: The message of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ErrorDetail. + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :param message: The message of this ErrorDetail. # noqa: E501 + :type message: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/filter.py b/hubspot/crm/tickets/models/filter.py index 5451ea9d..61889b66 100644 --- a/hubspot/crm/tickets/models/filter.py +++ b/hubspot/crm/tickets/models/filter.py @@ -35,73 +35,75 @@ class Filter(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"value": "str", "high_value": "str", "values": "list[str]", "property_name": "str", "operator": "str"} + openapi_types = {"high_value": "str", "property_name": "str", "values": "list[str]", "value": "str", "operator": "str"} - attribute_map = {"value": "value", "high_value": "highValue", "values": "values", "property_name": "propertyName", "operator": "operator"} + attribute_map = {"high_value": "highValue", "property_name": "propertyName", "values": "values", "value": "value", "operator": "operator"} - def __init__(self, value=None, high_value=None, values=None, property_name=None, operator=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, high_value=None, property_name=None, values=None, value=None, operator=None, local_vars_configuration=None): # noqa: E501 """Filter - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._value = None self._high_value = None - self._values = None self._property_name = None + self._values = None + self._value = None self._operator = None self.discriminator = None - if value is not None: - self.value = value if high_value is not None: self.high_value = high_value + self.property_name = property_name if values is not None: self.values = values - self.property_name = property_name + if value is not None: + self.value = value self.operator = operator @property - def value(self): - """Gets the value of this Filter. # noqa: E501 + def high_value(self): + """Gets the high_value of this Filter. # noqa: E501 - :return: The value of this Filter. # noqa: E501 + :return: The high_value of this Filter. # noqa: E501 :rtype: str """ - return self._value + return self._high_value - @value.setter - def value(self, value): - """Sets the value of this Filter. + @high_value.setter + def high_value(self, high_value): + """Sets the high_value of this Filter. - :param value: The value of this Filter. # noqa: E501 - :type value: str + :param high_value: The high_value of this Filter. # noqa: E501 + :type high_value: str """ - self._value = value + self._high_value = high_value @property - def high_value(self): - """Gets the high_value of this Filter. # noqa: E501 + def property_name(self): + """Gets the property_name of this Filter. # noqa: E501 - :return: The high_value of this Filter. # noqa: E501 + :return: The property_name of this Filter. # noqa: E501 :rtype: str """ - return self._high_value + return self._property_name - @high_value.setter - def high_value(self, high_value): - """Sets the high_value of this Filter. + @property_name.setter + def property_name(self, property_name): + """Sets the property_name of this Filter. - :param high_value: The high_value of this Filter. # noqa: E501 - :type high_value: str + :param property_name: The property_name of this Filter. # noqa: E501 + :type property_name: str """ + if self.local_vars_configuration.client_side_validation and property_name is None: # noqa: E501 + raise ValueError("Invalid value for `property_name`, must not be `None`") # noqa: E501 - self._high_value = high_value + self._property_name = property_name @property def values(self): @@ -125,27 +127,25 @@ def values(self, values): self._values = values @property - def property_name(self): - """Gets the property_name of this Filter. # noqa: E501 + def value(self): + """Gets the value of this Filter. # noqa: E501 - :return: The property_name of this Filter. # noqa: E501 + :return: The value of this Filter. # noqa: E501 :rtype: str """ - return self._property_name + return self._value - @property_name.setter - def property_name(self, property_name): - """Sets the property_name of this Filter. + @value.setter + def value(self, value): + """Sets the value of this Filter. - :param property_name: The property_name of this Filter. # noqa: E501 - :type property_name: str + :param value: The value of this Filter. # noqa: E501 + :type value: str """ - if self.local_vars_configuration.client_side_validation and property_name is None: # noqa: E501 - raise ValueError("Invalid value for `property_name`, must not be `None`") # noqa: E501 - self._property_name = property_name + self._value = value @property def operator(self): diff --git a/hubspot/crm/tickets/models/next_page.py b/hubspot/crm/tickets/models/next_page.py index 4c3ed30a..a1fa8e44 100644 --- a/hubspot/crm/tickets/models/next_page.py +++ b/hubspot/crm/tickets/models/next_page.py @@ -35,23 +35,44 @@ class NextPage(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"after": "str", "link": "str"} + openapi_types = {"link": "str", "after": "str"} - attribute_map = {"after": "after", "link": "link"} + attribute_map = {"link": "link", "after": "after"} - def __init__(self, after=None, link=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, link=None, after=None, local_vars_configuration=None): # noqa: E501 """NextPage - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._after = None self._link = None + self._after = None self.discriminator = None - self.after = after if link is not None: self.link = link + self.after = after + + @property + def link(self): + """Gets the link of this NextPage. # noqa: E501 + + + :return: The link of this NextPage. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this NextPage. + + + :param link: The link of this NextPage. # noqa: E501 + :type link: str + """ + + self._link = link @property def after(self): @@ -76,27 +97,6 @@ def after(self, after): self._after = after - @property - def link(self): - """Gets the link of this NextPage. # noqa: E501 - - - :return: The link of this NextPage. # noqa: E501 - :rtype: str - """ - return self._link - - @link.setter - def link(self, link): - """Sets the link of this NextPage. - - - :param link: The link of this NextPage. # noqa: E501 - :type link: str - """ - - self._link = link - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/public_associations_for_object.py b/hubspot/crm/tickets/models/public_associations_for_object.py index 90e664c9..f43a74a2 100644 --- a/hubspot/crm/tickets/models/public_associations_for_object.py +++ b/hubspot/crm/tickets/models/public_associations_for_object.py @@ -35,45 +35,22 @@ class PublicAssociationsForObject(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"to": "PublicObjectId", "types": "list[AssociationSpec]"} + openapi_types = {"types": "list[AssociationSpec]", "to": "PublicObjectId"} - attribute_map = {"to": "to", "types": "types"} + attribute_map = {"types": "types", "to": "to"} - def __init__(self, to=None, types=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, types=None, to=None, local_vars_configuration=None): # noqa: E501 """PublicAssociationsForObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._to = None self._types = None + self._to = None self.discriminator = None - self.to = to self.types = types - - @property - def to(self): - """Gets the to of this PublicAssociationsForObject. # noqa: E501 - - - :return: The to of this PublicAssociationsForObject. # noqa: E501 - :rtype: PublicObjectId - """ - return self._to - - @to.setter - def to(self, to): - """Sets the to of this PublicAssociationsForObject. - - - :param to: The to of this PublicAssociationsForObject. # noqa: E501 - :type to: PublicObjectId - """ - if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 - raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 - - self._to = to + self.to = to @property def types(self): @@ -98,6 +75,29 @@ def types(self, types): self._types = types + @property + def to(self): + """Gets the to of this PublicAssociationsForObject. # noqa: E501 + + + :return: The to of this PublicAssociationsForObject. # noqa: E501 + :rtype: PublicObjectId + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this PublicAssociationsForObject. + + + :param to: The to of this PublicAssociationsForObject. # noqa: E501 + :type to: PublicObjectId + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/public_gdpr_delete_input.py b/hubspot/crm/tickets/models/public_gdpr_delete_input.py new file mode 100644 index 00000000..e07af23c --- /dev/null +++ b/hubspot/crm/tickets/models/public_gdpr_delete_input.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Tickets + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v3 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from hubspot.crm.tickets.configuration import Configuration + + +class PublicGdprDeleteInput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"id_property": "str", "object_id": "str"} + + attribute_map = {"id_property": "idProperty", "object_id": "objectId"} + + def __init__(self, id_property=None, object_id=None, local_vars_configuration=None): # noqa: E501 + """PublicGdprDeleteInput - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._id_property = None + self._object_id = None + self.discriminator = None + + if id_property is not None: + self.id_property = id_property + self.object_id = object_id + + @property + def id_property(self): + """Gets the id_property of this PublicGdprDeleteInput. # noqa: E501 + + + :return: The id_property of this PublicGdprDeleteInput. # noqa: E501 + :rtype: str + """ + return self._id_property + + @id_property.setter + def id_property(self, id_property): + """Sets the id_property of this PublicGdprDeleteInput. + + + :param id_property: The id_property of this PublicGdprDeleteInput. # noqa: E501 + :type id_property: str + """ + + self._id_property = id_property + + @property + def object_id(self): + """Gets the object_id of this PublicGdprDeleteInput. # noqa: E501 + + + :return: The object_id of this PublicGdprDeleteInput. # noqa: E501 + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """Sets the object_id of this PublicGdprDeleteInput. + + + :param object_id: The object_id of this PublicGdprDeleteInput. # noqa: E501 + :type object_id: str + """ + if self.local_vars_configuration.client_side_validation and object_id is None: # noqa: E501 + raise ValueError("Invalid value for `object_id`, must not be `None`") # noqa: E501 + + self._object_id = object_id + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map(lambda x: convert(x), value)) + elif isinstance(value, dict): + result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items())) + else: + result[attr] = convert(value) + + return result + + 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, PublicGdprDeleteInput): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PublicGdprDeleteInput): + return True + + return self.to_dict() != other.to_dict() diff --git a/hubspot/crm/tickets/models/public_merge_input.py b/hubspot/crm/tickets/models/public_merge_input.py index c283b398..f25ec94c 100644 --- a/hubspot/crm/tickets/models/public_merge_input.py +++ b/hubspot/crm/tickets/models/public_merge_input.py @@ -35,45 +35,22 @@ class PublicMergeInput(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"primary_object_id": "str", "object_id_to_merge": "str"} + openapi_types = {"object_id_to_merge": "str", "primary_object_id": "str"} - attribute_map = {"primary_object_id": "primaryObjectId", "object_id_to_merge": "objectIdToMerge"} + attribute_map = {"object_id_to_merge": "objectIdToMerge", "primary_object_id": "primaryObjectId"} - def __init__(self, primary_object_id=None, object_id_to_merge=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, object_id_to_merge=None, primary_object_id=None, local_vars_configuration=None): # noqa: E501 """PublicMergeInput - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._primary_object_id = None self._object_id_to_merge = None + self._primary_object_id = None self.discriminator = None - self.primary_object_id = primary_object_id self.object_id_to_merge = object_id_to_merge - - @property - def primary_object_id(self): - """Gets the primary_object_id of this PublicMergeInput. # noqa: E501 - - - :return: The primary_object_id of this PublicMergeInput. # noqa: E501 - :rtype: str - """ - return self._primary_object_id - - @primary_object_id.setter - def primary_object_id(self, primary_object_id): - """Sets the primary_object_id of this PublicMergeInput. - - - :param primary_object_id: The primary_object_id of this PublicMergeInput. # noqa: E501 - :type primary_object_id: str - """ - if self.local_vars_configuration.client_side_validation and primary_object_id is None: # noqa: E501 - raise ValueError("Invalid value for `primary_object_id`, must not be `None`") # noqa: E501 - - self._primary_object_id = primary_object_id + self.primary_object_id = primary_object_id @property def object_id_to_merge(self): @@ -98,6 +75,29 @@ def object_id_to_merge(self, object_id_to_merge): self._object_id_to_merge = object_id_to_merge + @property + def primary_object_id(self): + """Gets the primary_object_id of this PublicMergeInput. # noqa: E501 + + + :return: The primary_object_id of this PublicMergeInput. # noqa: E501 + :rtype: str + """ + return self._primary_object_id + + @primary_object_id.setter + def primary_object_id(self, primary_object_id): + """Sets the primary_object_id of this PublicMergeInput. + + + :param primary_object_id: The primary_object_id of this PublicMergeInput. # noqa: E501 + :type primary_object_id: str + """ + if self.local_vars_configuration.client_side_validation and primary_object_id is None: # noqa: E501 + raise ValueError("Invalid value for `primary_object_id`, must not be `None`") # noqa: E501 + + self._primary_object_id = primary_object_id + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/public_object_search_request.py b/hubspot/crm/tickets/models/public_object_search_request.py index 2b05b84c..c367dc98 100644 --- a/hubspot/crm/tickets/models/public_object_search_request.py +++ b/hubspot/crm/tickets/models/public_object_search_request.py @@ -35,54 +35,98 @@ class PublicObjectSearchRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"filter_groups": "list[FilterGroup]", "sorts": "list[str]", "query": "str", "properties": "list[str]", "limit": "int", "after": "int"} + openapi_types = {"query": "str", "limit": "int", "after": "str", "sorts": "list[str]", "properties": "list[str]", "filter_groups": "list[FilterGroup]"} - attribute_map = {"filter_groups": "filterGroups", "sorts": "sorts", "query": "query", "properties": "properties", "limit": "limit", "after": "after"} + attribute_map = {"query": "query", "limit": "limit", "after": "after", "sorts": "sorts", "properties": "properties", "filter_groups": "filterGroups"} - def __init__(self, filter_groups=None, sorts=None, query=None, properties=None, limit=None, after=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, query=None, limit=None, after=None, sorts=None, properties=None, filter_groups=None, local_vars_configuration=None): # noqa: E501 """PublicObjectSearchRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._filter_groups = None - self._sorts = None self._query = None - self._properties = None self._limit = None self._after = None + self._sorts = None + self._properties = None + self._filter_groups = None self.discriminator = None - self.filter_groups = filter_groups - self.sorts = sorts if query is not None: self.query = query - self.properties = properties self.limit = limit self.after = after + self.sorts = sorts + self.properties = properties + self.filter_groups = filter_groups @property - def filter_groups(self): - """Gets the filter_groups of this PublicObjectSearchRequest. # noqa: E501 + def query(self): + """Gets the query of this PublicObjectSearchRequest. # noqa: E501 - :return: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :rtype: list[FilterGroup] + :return: The query of this PublicObjectSearchRequest. # noqa: E501 + :rtype: str """ - return self._filter_groups + return self._query - @filter_groups.setter - def filter_groups(self, filter_groups): - """Sets the filter_groups of this PublicObjectSearchRequest. + @query.setter + def query(self, query): + """Sets the query of this PublicObjectSearchRequest. - :param filter_groups: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :type filter_groups: list[FilterGroup] + :param query: The query of this PublicObjectSearchRequest. # noqa: E501 + :type query: str """ - if self.local_vars_configuration.client_side_validation and filter_groups is None: # noqa: E501 - raise ValueError("Invalid value for `filter_groups`, must not be `None`") # noqa: E501 - self._filter_groups = filter_groups + self._query = query + + @property + def limit(self): + """Gets the limit of this PublicObjectSearchRequest. # noqa: E501 + + + :return: The limit of this PublicObjectSearchRequest. # noqa: E501 + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this PublicObjectSearchRequest. + + + :param limit: The limit of this PublicObjectSearchRequest. # noqa: E501 + :type limit: int + """ + if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 + raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 + + self._limit = limit + + @property + def after(self): + """Gets the after of this PublicObjectSearchRequest. # noqa: E501 + + + :return: The after of this PublicObjectSearchRequest. # noqa: E501 + :rtype: str + """ + return self._after + + @after.setter + def after(self, after): + """Sets the after of this PublicObjectSearchRequest. + + + :param after: The after of this PublicObjectSearchRequest. # noqa: E501 + :type after: str + """ + if self.local_vars_configuration.client_side_validation and after is None: # noqa: E501 + raise ValueError("Invalid value for `after`, must not be `None`") # noqa: E501 + + self._after = after @property def sorts(self): @@ -107,27 +151,6 @@ def sorts(self, sorts): self._sorts = sorts - @property - def query(self): - """Gets the query of this PublicObjectSearchRequest. # noqa: E501 - - - :return: The query of this PublicObjectSearchRequest. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this PublicObjectSearchRequest. - - - :param query: The query of this PublicObjectSearchRequest. # noqa: E501 - :type query: str - """ - - self._query = query - @property def properties(self): """Gets the properties of this PublicObjectSearchRequest. # noqa: E501 @@ -152,50 +175,27 @@ def properties(self, properties): self._properties = properties @property - def limit(self): - """Gets the limit of this PublicObjectSearchRequest. # noqa: E501 - - - :return: The limit of this PublicObjectSearchRequest. # noqa: E501 - :rtype: int - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this PublicObjectSearchRequest. - - - :param limit: The limit of this PublicObjectSearchRequest. # noqa: E501 - :type limit: int - """ - if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 - raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 - - self._limit = limit - - @property - def after(self): - """Gets the after of this PublicObjectSearchRequest. # noqa: E501 + def filter_groups(self): + """Gets the filter_groups of this PublicObjectSearchRequest. # noqa: E501 - :return: The after of this PublicObjectSearchRequest. # noqa: E501 - :rtype: int + :return: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 + :rtype: list[FilterGroup] """ - return self._after + return self._filter_groups - @after.setter - def after(self, after): - """Sets the after of this PublicObjectSearchRequest. + @filter_groups.setter + def filter_groups(self, filter_groups): + """Sets the filter_groups of this PublicObjectSearchRequest. - :param after: The after of this PublicObjectSearchRequest. # noqa: E501 - :type after: int + :param filter_groups: The filter_groups of this PublicObjectSearchRequest. # noqa: E501 + :type filter_groups: list[FilterGroup] """ - if self.local_vars_configuration.client_side_validation and after is None: # noqa: E501 - raise ValueError("Invalid value for `after`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and filter_groups is None: # noqa: E501 + raise ValueError("Invalid value for `filter_groups`, must not be `None`") # noqa: E501 - self._after = after + self._filter_groups = filter_groups def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/tickets/models/simple_public_object.py b/hubspot/crm/tickets/models/simple_public_object.py index c7ae8e4e..5251035f 100644 --- a/hubspot/crm/tickets/models/simple_public_object.py +++ b/hubspot/crm/tickets/models/simple_public_object.py @@ -36,96 +36,115 @@ class SimplePublicObject(object): and the value is json key in definition. """ openapi_types = { - "id": "str", - "properties": "dict[str, str]", - "properties_with_history": "dict[str, list[ValueWithTimestamp]]", "created_at": "datetime", - "updated_at": "datetime", "archived": "bool", "archived_at": "datetime", + "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "id": "str", + "properties": "dict[str, str]", + "updated_at": "datetime", } attribute_map = { - "id": "id", - "properties": "properties", - "properties_with_history": "propertiesWithHistory", "created_at": "createdAt", - "updated_at": "updatedAt", "archived": "archived", "archived_at": "archivedAt", + "properties_with_history": "propertiesWithHistory", + "id": "id", + "properties": "properties", + "updated_at": "updatedAt", } - def __init__(self, id=None, properties=None, properties_with_history=None, created_at=None, updated_at=None, archived=None, archived_at=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, created_at=None, archived=None, archived_at=None, properties_with_history=None, id=None, properties=None, updated_at=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._id = None - self._properties = None - self._properties_with_history = None self._created_at = None - self._updated_at = None self._archived = None self._archived_at = None + self._properties_with_history = None + self._id = None + self._properties = None + self._updated_at = None self.discriminator = None - self.id = id - self.properties = properties - if properties_with_history is not None: - self.properties_with_history = properties_with_history self.created_at = created_at - self.updated_at = updated_at if archived is not None: self.archived = archived if archived_at is not None: self.archived_at = archived_at + if properties_with_history is not None: + self.properties_with_history = properties_with_history + self.id = id + self.properties = properties + self.updated_at = updated_at @property - def id(self): - """Gets the id of this SimplePublicObject. # noqa: E501 + def created_at(self): + """Gets the created_at of this SimplePublicObject. # noqa: E501 - :return: The id of this SimplePublicObject. # noqa: E501 - :rtype: str + :return: The created_at of this SimplePublicObject. # noqa: E501 + :rtype: datetime """ - return self._id + return self._created_at - @id.setter - def id(self, id): - """Sets the id of this SimplePublicObject. + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SimplePublicObject. - :param id: The id of this SimplePublicObject. # noqa: E501 - :type id: str + :param created_at: The created_at of this SimplePublicObject. # noqa: E501 + :type created_at: datetime """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 - self._id = id + self._created_at = created_at @property - def properties(self): - """Gets the properties of this SimplePublicObject. # noqa: E501 + def archived(self): + """Gets the archived of this SimplePublicObject. # noqa: E501 - :return: The properties of this SimplePublicObject. # noqa: E501 - :rtype: dict[str, str] + :return: The archived of this SimplePublicObject. # noqa: E501 + :rtype: bool """ - return self._properties + return self._archived - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObject. + @archived.setter + def archived(self, archived): + """Sets the archived of this SimplePublicObject. - :param properties: The properties of this SimplePublicObject. # noqa: E501 - :type properties: dict[str, str] + :param archived: The archived of this SimplePublicObject. # noqa: E501 + :type archived: bool """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - self._properties = properties + self._archived = archived + + @property + def archived_at(self): + """Gets the archived_at of this SimplePublicObject. # noqa: E501 + + + :return: The archived_at of this SimplePublicObject. # noqa: E501 + :rtype: datetime + """ + return self._archived_at + + @archived_at.setter + def archived_at(self, archived_at): + """Sets the archived_at of this SimplePublicObject. + + + :param archived_at: The archived_at of this SimplePublicObject. # noqa: E501 + :type archived_at: datetime + """ + + self._archived_at = archived_at @property def properties_with_history(self): @@ -149,27 +168,50 @@ def properties_with_history(self, properties_with_history): self._properties_with_history = properties_with_history @property - def created_at(self): - """Gets the created_at of this SimplePublicObject. # noqa: E501 + def id(self): + """Gets the id of this SimplePublicObject. # noqa: E501 - :return: The created_at of this SimplePublicObject. # noqa: E501 - :rtype: datetime + :return: The id of this SimplePublicObject. # noqa: E501 + :rtype: str """ - return self._created_at + return self._id - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this SimplePublicObject. + @id.setter + def id(self, id): + """Sets the id of this SimplePublicObject. - :param created_at: The created_at of this SimplePublicObject. # noqa: E501 - :type created_at: datetime + :param id: The id of this SimplePublicObject. # noqa: E501 + :type id: str """ - if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 - raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._created_at = created_at + self._id = id + + @property + def properties(self): + """Gets the properties of this SimplePublicObject. # noqa: E501 + + + :return: The properties of this SimplePublicObject. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObject. + + + :param properties: The properties of this SimplePublicObject. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties @property def updated_at(self): @@ -194,48 +236,6 @@ def updated_at(self, updated_at): self._updated_at = updated_at - @property - def archived(self): - """Gets the archived of this SimplePublicObject. # noqa: E501 - - - :return: The archived of this SimplePublicObject. # noqa: E501 - :rtype: bool - """ - return self._archived - - @archived.setter - def archived(self, archived): - """Sets the archived of this SimplePublicObject. - - - :param archived: The archived of this SimplePublicObject. # noqa: E501 - :type archived: bool - """ - - self._archived = archived - - @property - def archived_at(self): - """Gets the archived_at of this SimplePublicObject. # noqa: E501 - - - :return: The archived_at of this SimplePublicObject. # noqa: E501 - :rtype: datetime - """ - return self._archived_at - - @archived_at.setter - def archived_at(self, archived_at): - """Sets the archived_at of this SimplePublicObject. - - - :param archived_at: The archived_at of this SimplePublicObject. # noqa: E501 - :type archived_at: datetime - """ - - self._archived_at = archived_at - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/simple_public_object_batch_input.py b/hubspot/crm/tickets/models/simple_public_object_batch_input.py index 73be8142..7bd57f8e 100644 --- a/hubspot/crm/tickets/models/simple_public_object_batch_input.py +++ b/hubspot/crm/tickets/models/simple_public_object_batch_input.py @@ -35,45 +35,46 @@ class SimplePublicObjectBatchInput(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "dict[str, str]", "id": "str"} + openapi_types = {"id_property": "str", "id": "str", "properties": "dict[str, str]"} - attribute_map = {"properties": "properties", "id": "id"} + attribute_map = {"id_property": "idProperty", "id": "id", "properties": "properties"} - def __init__(self, properties=None, id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id_property=None, id=None, properties=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObjectBatchInput - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None + self._id_property = None self._id = None + self._properties = None self.discriminator = None - self.properties = properties + if id_property is not None: + self.id_property = id_property self.id = id + self.properties = properties @property - def properties(self): - """Gets the properties of this SimplePublicObjectBatchInput. # noqa: E501 + def id_property(self): + """Gets the id_property of this SimplePublicObjectBatchInput. # noqa: E501 - :return: The properties of this SimplePublicObjectBatchInput. # noqa: E501 - :rtype: dict[str, str] + :return: The id_property of this SimplePublicObjectBatchInput. # noqa: E501 + :rtype: str """ - return self._properties + return self._id_property - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectBatchInput. + @id_property.setter + def id_property(self, id_property): + """Sets the id_property of this SimplePublicObjectBatchInput. - :param properties: The properties of this SimplePublicObjectBatchInput. # noqa: E501 - :type properties: dict[str, str] + :param id_property: The id_property of this SimplePublicObjectBatchInput. # noqa: E501 + :type id_property: str """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - self._properties = properties + self._id_property = id_property @property def id(self): @@ -98,6 +99,29 @@ def id(self, id): self._id = id + @property + def properties(self): + """Gets the properties of this SimplePublicObjectBatchInput. # noqa: E501 + + + :return: The properties of this SimplePublicObjectBatchInput. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectBatchInput. + + + :param properties: The properties of this SimplePublicObjectBatchInput. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/simple_public_object_input_for_create.py b/hubspot/crm/tickets/models/simple_public_object_input_for_create.py index 3117d8a6..55db2b23 100644 --- a/hubspot/crm/tickets/models/simple_public_object_input_for_create.py +++ b/hubspot/crm/tickets/models/simple_public_object_input_for_create.py @@ -35,45 +35,22 @@ class SimplePublicObjectInputForCreate(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"properties": "dict[str, str]", "associations": "list[PublicAssociationsForObject]"} + openapi_types = {"associations": "list[PublicAssociationsForObject]", "properties": "dict[str, str]"} - attribute_map = {"properties": "properties", "associations": "associations"} + attribute_map = {"associations": "associations", "properties": "properties"} - def __init__(self, properties=None, associations=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, associations=None, properties=None, local_vars_configuration=None): # noqa: E501 """SimplePublicObjectInputForCreate - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._properties = None self._associations = None + self._properties = None self.discriminator = None - self.properties = properties self.associations = associations - - @property - def properties(self): - """Gets the properties of this SimplePublicObjectInputForCreate. # noqa: E501 - - - :return: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 - :rtype: dict[str, str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectInputForCreate. - - - :param properties: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 - :type properties: dict[str, str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + self.properties = properties @property def associations(self): @@ -98,6 +75,29 @@ def associations(self, associations): self._associations = associations + @property + def properties(self): + """Gets the properties of this SimplePublicObjectInputForCreate. # noqa: E501 + + + :return: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectInputForCreate. + + + :param properties: The properties of this SimplePublicObjectInputForCreate. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/tickets/models/simple_public_object_with_associations.py b/hubspot/crm/tickets/models/simple_public_object_with_associations.py index 1edfceae..8e9818bc 100644 --- a/hubspot/crm/tickets/models/simple_public_object_with_associations.py +++ b/hubspot/crm/tickets/models/simple_public_object_with_associations.py @@ -36,124 +36,78 @@ class SimplePublicObjectWithAssociations(object): and the value is json key in definition. """ openapi_types = { - "id": "str", - "properties": "dict[str, str]", - "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "associations": "dict[str, CollectionResponseAssociatedId]", "created_at": "datetime", - "updated_at": "datetime", "archived": "bool", "archived_at": "datetime", - "associations": "dict[str, CollectionResponseAssociatedId]", + "properties_with_history": "dict[str, list[ValueWithTimestamp]]", + "id": "str", + "properties": "dict[str, str]", + "updated_at": "datetime", } attribute_map = { - "id": "id", - "properties": "properties", - "properties_with_history": "propertiesWithHistory", + "associations": "associations", "created_at": "createdAt", - "updated_at": "updatedAt", "archived": "archived", "archived_at": "archivedAt", - "associations": "associations", + "properties_with_history": "propertiesWithHistory", + "id": "id", + "properties": "properties", + "updated_at": "updatedAt", } def __init__( - self, id=None, properties=None, properties_with_history=None, created_at=None, updated_at=None, archived=None, archived_at=None, associations=None, local_vars_configuration=None + self, associations=None, created_at=None, archived=None, archived_at=None, properties_with_history=None, id=None, properties=None, updated_at=None, local_vars_configuration=None ): # noqa: E501 """SimplePublicObjectWithAssociations - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._id = None - self._properties = None - self._properties_with_history = None + self._associations = None self._created_at = None - self._updated_at = None self._archived = None self._archived_at = None - self._associations = None + self._properties_with_history = None + self._id = None + self._properties = None + self._updated_at = None self.discriminator = None - self.id = id - self.properties = properties - if properties_with_history is not None: - self.properties_with_history = properties_with_history + if associations is not None: + self.associations = associations self.created_at = created_at - self.updated_at = updated_at if archived is not None: self.archived = archived if archived_at is not None: self.archived_at = archived_at - if associations is not None: - self.associations = associations - - @property - def id(self): - """Gets the id of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The id of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this SimplePublicObjectWithAssociations. - - - :param id: The id of this SimplePublicObjectWithAssociations. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def properties(self): - """Gets the properties of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, str] - """ - return self._properties - - @properties.setter - def properties(self, properties): - """Sets the properties of this SimplePublicObjectWithAssociations. - - - :param properties: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 - :type properties: dict[str, str] - """ - if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - - self._properties = properties + if properties_with_history is not None: + self.properties_with_history = properties_with_history + self.id = id + self.properties = properties + self.updated_at = updated_at @property - def properties_with_history(self): - """Gets the properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + def associations(self): + """Gets the associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :return: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, list[ValueWithTimestamp]] + :return: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, CollectionResponseAssociatedId] """ - return self._properties_with_history + return self._associations - @properties_with_history.setter - def properties_with_history(self, properties_with_history): - """Sets the properties_with_history of this SimplePublicObjectWithAssociations. + @associations.setter + def associations(self, associations): + """Sets the associations of this SimplePublicObjectWithAssociations. - :param properties_with_history: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :type properties_with_history: dict[str, list[ValueWithTimestamp]] + :param associations: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 + :type associations: dict[str, CollectionResponseAssociatedId] """ - self._properties_with_history = properties_with_history + self._associations = associations @property def created_at(self): @@ -178,29 +132,6 @@ def created_at(self, created_at): self._created_at = created_at - @property - def updated_at(self): - """Gets the updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - - - :return: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: datetime - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this SimplePublicObjectWithAssociations. - - - :param updated_at: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 - :type updated_at: datetime - """ - if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 - raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 - - self._updated_at = updated_at - @property def archived(self): """Gets the archived of this SimplePublicObjectWithAssociations. # noqa: E501 @@ -244,25 +175,94 @@ def archived_at(self, archived_at): self._archived_at = archived_at @property - def associations(self): - """Gets the associations of this SimplePublicObjectWithAssociations. # noqa: E501 + def properties_with_history(self): + """Gets the properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 - :return: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :rtype: dict[str, CollectionResponseAssociatedId] + :return: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, list[ValueWithTimestamp]] """ - return self._associations + return self._properties_with_history - @associations.setter - def associations(self, associations): - """Sets the associations of this SimplePublicObjectWithAssociations. + @properties_with_history.setter + def properties_with_history(self, properties_with_history): + """Sets the properties_with_history of this SimplePublicObjectWithAssociations. - :param associations: The associations of this SimplePublicObjectWithAssociations. # noqa: E501 - :type associations: dict[str, CollectionResponseAssociatedId] + :param properties_with_history: The properties_with_history of this SimplePublicObjectWithAssociations. # noqa: E501 + :type properties_with_history: dict[str, list[ValueWithTimestamp]] """ - self._associations = associations + self._properties_with_history = properties_with_history + + @property + def id(self): + """Gets the id of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The id of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SimplePublicObjectWithAssociations. + + + :param id: The id of this SimplePublicObjectWithAssociations. # noqa: E501 + :type id: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def properties(self): + """Gets the properties of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: dict[str, str] + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this SimplePublicObjectWithAssociations. + + + :param properties: The properties of this SimplePublicObjectWithAssociations. # noqa: E501 + :type properties: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501 + raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 + + self._properties = properties + + @property + def updated_at(self): + """Gets the updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + + + :return: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this SimplePublicObjectWithAssociations. + + + :param updated_at: The updated_at of this SimplePublicObjectWithAssociations. # noqa: E501 + :type updated_at: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/tickets/models/standard_error.py b/hubspot/crm/tickets/models/standard_error.py index 2980ce4c..d973ad5f 100644 --- a/hubspot/crm/tickets/models/standard_error.py +++ b/hubspot/crm/tickets/models/standard_error.py @@ -36,67 +36,111 @@ class StandardError(object): and the value is json key in definition. """ openapi_types = { - "status": "str", + "sub_category": "object", + "context": "dict[str, list[str]]", + "links": "dict[str, str]", "id": "str", "category": "str", - "sub_category": "object", "message": "str", "errors": "list[ErrorDetail]", - "context": "dict[str, list[str]]", - "links": "dict[str, str]", + "status": "str", } - attribute_map = {"status": "status", "id": "id", "category": "category", "sub_category": "subCategory", "message": "message", "errors": "errors", "context": "context", "links": "links"} + attribute_map = {"sub_category": "subCategory", "context": "context", "links": "links", "id": "id", "category": "category", "message": "message", "errors": "errors", "status": "status"} - def __init__(self, status=None, id=None, category=None, sub_category=None, message=None, errors=None, context=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, context=None, links=None, id=None, category=None, message=None, errors=None, status=None, local_vars_configuration=None): # noqa: E501 """StandardError - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None + self._sub_category = None + self._context = None + self._links = None self._id = None self._category = None - self._sub_category = None self._message = None self._errors = None - self._context = None - self._links = None + self._status = None self.discriminator = None - self.status = status + if sub_category is not None: + self.sub_category = sub_category + self.context = context + self.links = links if id is not None: self.id = id self.category = category - if sub_category is not None: - self.sub_category = sub_category self.message = message self.errors = errors - self.context = context - self.links = links + self.status = status @property - def status(self): - """Gets the status of this StandardError. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this StandardError. # noqa: E501 - :return: The status of this StandardError. # noqa: E501 - :rtype: str + :return: The sub_category of this StandardError. # noqa: E501 + :rtype: object """ - return self._status + return self._sub_category - @status.setter - def status(self, status): - """Sets the status of this StandardError. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this StandardError. - :param status: The status of this StandardError. # noqa: E501 - :type status: str + :param sub_category: The sub_category of this StandardError. # noqa: E501 + :type sub_category: object """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._status = status + self._sub_category = sub_category + + @property + def context(self): + """Gets the context of this StandardError. # noqa: E501 + + + :return: The context of this StandardError. # noqa: E501 + :rtype: dict[str, list[str]] + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this StandardError. + + + :param context: The context of this StandardError. # noqa: E501 + :type context: dict[str, list[str]] + """ + if self.local_vars_configuration.client_side_validation and context is None: # noqa: E501 + raise ValueError("Invalid value for `context`, must not be `None`") # noqa: E501 + + self._context = context + + @property + def links(self): + """Gets the links of this StandardError. # noqa: E501 + + + :return: The links of this StandardError. # noqa: E501 + :rtype: dict[str, str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this StandardError. + + + :param links: The links of this StandardError. # noqa: E501 + :type links: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 + raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + + self._links = links @property def id(self): @@ -142,27 +186,6 @@ def category(self, category): self._category = category - @property - def sub_category(self): - """Gets the sub_category of this StandardError. # noqa: E501 - - - :return: The sub_category of this StandardError. # noqa: E501 - :rtype: object - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this StandardError. - - - :param sub_category: The sub_category of this StandardError. # noqa: E501 - :type sub_category: object - """ - - self._sub_category = sub_category - @property def message(self): """Gets the message of this StandardError. # noqa: E501 @@ -210,50 +233,27 @@ def errors(self, errors): self._errors = errors @property - def context(self): - """Gets the context of this StandardError. # noqa: E501 - - - :return: The context of this StandardError. # noqa: E501 - :rtype: dict[str, list[str]] - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this StandardError. - - - :param context: The context of this StandardError. # noqa: E501 - :type context: dict[str, list[str]] - """ - if self.local_vars_configuration.client_side_validation and context is None: # noqa: E501 - raise ValueError("Invalid value for `context`, must not be `None`") # noqa: E501 - - self._context = context - - @property - def links(self): - """Gets the links of this StandardError. # noqa: E501 + def status(self): + """Gets the status of this StandardError. # noqa: E501 - :return: The links of this StandardError. # noqa: E501 - :rtype: dict[str, str] + :return: The status of this StandardError. # noqa: E501 + :rtype: str """ - return self._links + return self._status - @links.setter - def links(self, links): - """Sets the links of this StandardError. + @status.setter + def status(self, status): + """Sets the status of this StandardError. - :param links: The links of this StandardError. # noqa: E501 - :type links: dict[str, str] + :param status: The status of this StandardError. # noqa: E501 + :type status: str """ - if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 - raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._links = links + self._status = status def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/tickets/models/value_with_timestamp.py b/hubspot/crm/tickets/models/value_with_timestamp.py index a1b3271f..f96b5ba0 100644 --- a/hubspot/crm/tickets/models/value_with_timestamp.py +++ b/hubspot/crm/tickets/models/value_with_timestamp.py @@ -35,79 +35,54 @@ class ValueWithTimestamp(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"value": "str", "timestamp": "datetime", "source_type": "str", "source_id": "str", "source_label": "str", "updated_by_user_id": "int"} + openapi_types = {"source_id": "str", "source_type": "str", "source_label": "str", "updated_by_user_id": "int", "value": "str", "timestamp": "datetime"} - attribute_map = {"value": "value", "timestamp": "timestamp", "source_type": "sourceType", "source_id": "sourceId", "source_label": "sourceLabel", "updated_by_user_id": "updatedByUserId"} + attribute_map = {"source_id": "sourceId", "source_type": "sourceType", "source_label": "sourceLabel", "updated_by_user_id": "updatedByUserId", "value": "value", "timestamp": "timestamp"} - def __init__(self, value=None, timestamp=None, source_type=None, source_id=None, source_label=None, updated_by_user_id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, source_id=None, source_type=None, source_label=None, updated_by_user_id=None, value=None, timestamp=None, local_vars_configuration=None): # noqa: E501 """ValueWithTimestamp - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._value = None - self._timestamp = None - self._source_type = None self._source_id = None + self._source_type = None self._source_label = None self._updated_by_user_id = None + self._value = None + self._timestamp = None self.discriminator = None - self.value = value - self.timestamp = timestamp - self.source_type = source_type if source_id is not None: self.source_id = source_id + self.source_type = source_type if source_label is not None: self.source_label = source_label if updated_by_user_id is not None: self.updated_by_user_id = updated_by_user_id + self.value = value + self.timestamp = timestamp @property - def value(self): - """Gets the value of this ValueWithTimestamp. # noqa: E501 + def source_id(self): + """Gets the source_id of this ValueWithTimestamp. # noqa: E501 - :return: The value of this ValueWithTimestamp. # noqa: E501 + :return: The source_id of this ValueWithTimestamp. # noqa: E501 :rtype: str """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this ValueWithTimestamp. - - - :param value: The value of this ValueWithTimestamp. # noqa: E501 - :type value: str - """ - if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - - self._value = value - - @property - def timestamp(self): - """Gets the timestamp of this ValueWithTimestamp. # noqa: E501 - - - :return: The timestamp of this ValueWithTimestamp. # noqa: E501 - :rtype: datetime - """ - return self._timestamp + return self._source_id - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this ValueWithTimestamp. + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this ValueWithTimestamp. - :param timestamp: The timestamp of this ValueWithTimestamp. # noqa: E501 - :type timestamp: datetime + :param source_id: The source_id of this ValueWithTimestamp. # noqa: E501 + :type source_id: str """ - if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 - raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 - self._timestamp = timestamp + self._source_id = source_id @property def source_type(self): @@ -132,27 +107,6 @@ def source_type(self, source_type): self._source_type = source_type - @property - def source_id(self): - """Gets the source_id of this ValueWithTimestamp. # noqa: E501 - - - :return: The source_id of this ValueWithTimestamp. # noqa: E501 - :rtype: str - """ - return self._source_id - - @source_id.setter - def source_id(self, source_id): - """Sets the source_id of this ValueWithTimestamp. - - - :param source_id: The source_id of this ValueWithTimestamp. # noqa: E501 - :type source_id: str - """ - - self._source_id = source_id - @property def source_label(self): """Gets the source_label of this ValueWithTimestamp. # noqa: E501 @@ -195,6 +149,52 @@ def updated_by_user_id(self, updated_by_user_id): self._updated_by_user_id = updated_by_user_id + @property + def value(self): + """Gets the value of this ValueWithTimestamp. # noqa: E501 + + + :return: The value of this ValueWithTimestamp. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ValueWithTimestamp. + + + :param value: The value of this ValueWithTimestamp. # noqa: E501 + :type value: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + @property + def timestamp(self): + """Gets the timestamp of this ValueWithTimestamp. # noqa: E501 + + + :return: The timestamp of this ValueWithTimestamp. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ValueWithTimestamp. + + + :param timestamp: The timestamp of this ValueWithTimestamp. # noqa: E501 + :type timestamp: datetime + """ + if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501 + raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 + + self._timestamp = timestamp + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/__init__.py b/hubspot/crm/timeline/__init__.py index 6991c951..d0834fc3 100644 --- a/hubspot/crm/timeline/__init__.py +++ b/hubspot/crm/timeline/__init__.py @@ -3,7 +3,7 @@ # flake8: noqa """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -37,7 +37,6 @@ from hubspot.crm.timeline.models.batch_response_timeline_event_response_with_errors import BatchResponseTimelineEventResponseWithErrors from hubspot.crm.timeline.models.collection_response_timeline_event_template_no_paging import CollectionResponseTimelineEventTemplateNoPaging from hubspot.crm.timeline.models.error import Error -from hubspot.crm.timeline.models.error_category import ErrorCategory from hubspot.crm.timeline.models.error_detail import ErrorDetail from hubspot.crm.timeline.models.event_detail import EventDetail from hubspot.crm.timeline.models.standard_error import StandardError diff --git a/hubspot/crm/timeline/api/events_api.py b/hubspot/crm/timeline/api/events_api.py index 47372b28..e1240ce8 100644 --- a/hubspot/crm/timeline/api/events_api.py +++ b/hubspot/crm/timeline/api/events_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -186,7 +186,7 @@ def create_batch(self, batch_input_timeline_event, **kwargs): # noqa: E501 :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: BatchResponseTimelineEventResponse + :rtype: None """ kwargs["_return_http_data_only"] = True return self.create_batch_with_http_info(batch_input_timeline_event, **kwargs) # noqa: E501 @@ -224,7 +224,7 @@ def create_batch_with_http_info(self, batch_input_timeline_event, **kwargs): # :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(BatchResponseTimelineEventResponse, status_code(int), headers(HTTPHeaderDict)) + :rtype: None """ local_var_params = locals() @@ -266,10 +266,7 @@ def create_batch_with_http_info(self, batch_input_timeline_event, **kwargs): # # Authentication setting auth_settings = ["oauth2"] # noqa: E501 - response_types_map = { - 201: "BatchResponseTimelineEventResponse", - 207: "BatchResponseTimelineEventResponseWithErrors", - } + response_types_map = {} return self.api_client.call_api( "/crm/v3/timeline/events/batch/create", diff --git a/hubspot/crm/timeline/api/templates_api.py b/hubspot/crm/timeline/api/templates_api.py index b8316204..d7b3b43e 100644 --- a/hubspot/crm/timeline/api/templates_api.py +++ b/hubspot/crm/timeline/api/templates_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 diff --git a/hubspot/crm/timeline/api/tokens_api.py b/hubspot/crm/timeline/api/tokens_api.py index 9615b59e..c7661894 100644 --- a/hubspot/crm/timeline/api/tokens_api.py +++ b/hubspot/crm/timeline/api/tokens_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 diff --git a/hubspot/crm/timeline/api_client.py b/hubspot/crm/timeline/api_client.py index fc445d06..237c593b 100644 --- a/hubspot/crm/timeline/api_client.py +++ b/hubspot/crm/timeline/api_client.py @@ -1,6 +1,6 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 diff --git a/hubspot/crm/timeline/configuration.py b/hubspot/crm/timeline/configuration.py index d42c48fa..7e186e41 100644 --- a/hubspot/crm/timeline/configuration.py +++ b/hubspot/crm/timeline/configuration.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 diff --git a/hubspot/crm/timeline/exceptions.py b/hubspot/crm/timeline/exceptions.py index a0a7b8a6..ec1860c1 100644 --- a/hubspot/crm/timeline/exceptions.py +++ b/hubspot/crm/timeline/exceptions.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 diff --git a/hubspot/crm/timeline/models/__init__.py b/hubspot/crm/timeline/models/__init__.py index 2e8fdba7..55d81771 100644 --- a/hubspot/crm/timeline/models/__init__.py +++ b/hubspot/crm/timeline/models/__init__.py @@ -2,7 +2,7 @@ # flake8: noqa """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -19,7 +19,6 @@ from hubspot.crm.timeline.models.batch_response_timeline_event_response_with_errors import BatchResponseTimelineEventResponseWithErrors from hubspot.crm.timeline.models.collection_response_timeline_event_template_no_paging import CollectionResponseTimelineEventTemplateNoPaging from hubspot.crm.timeline.models.error import Error -from hubspot.crm.timeline.models.error_category import ErrorCategory from hubspot.crm.timeline.models.error_detail import ErrorDetail from hubspot.crm.timeline.models.event_detail import EventDetail from hubspot.crm.timeline.models.standard_error import StandardError diff --git a/hubspot/crm/timeline/models/batch_input_timeline_event.py b/hubspot/crm/timeline/models/batch_input_timeline_event.py index 471b76e4..d63be386 100644 --- a/hubspot/crm/timeline/models/batch_input_timeline_event.py +++ b/hubspot/crm/timeline/models/batch_input_timeline_event.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 diff --git a/hubspot/crm/timeline/models/batch_response_timeline_event_response.py b/hubspot/crm/timeline/models/batch_response_timeline_event_response.py index 8b1cd1ac..928dba3f 100644 --- a/hubspot/crm/timeline/models/batch_response_timeline_event_response.py +++ b/hubspot/crm/timeline/models/batch_response_timeline_event_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -35,85 +35,57 @@ class BatchResponseTimelineEventResponse(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"status": "str", "results": "list[TimelineEventResponse]", "requested_at": "datetime", "started_at": "datetime", "completed_at": "datetime", "links": "dict[str, str]"} + openapi_types = {"completed_at": "datetime", "requested_at": "datetime", "started_at": "datetime", "links": "dict[str, str]", "results": "list[TimelineEventResponse]", "status": "str"} - attribute_map = {"status": "status", "results": "results", "requested_at": "requestedAt", "started_at": "startedAt", "completed_at": "completedAt", "links": "links"} + attribute_map = {"completed_at": "completedAt", "requested_at": "requestedAt", "started_at": "startedAt", "links": "links", "results": "results", "status": "status"} - def __init__(self, status=None, results=None, requested_at=None, started_at=None, completed_at=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, requested_at=None, started_at=None, links=None, results=None, status=None, local_vars_configuration=None): # noqa: E501 """BatchResponseTimelineEventResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None - self._results = None + self._completed_at = None self._requested_at = None self._started_at = None - self._completed_at = None self._links = None + self._results = None + self._status = None self.discriminator = None - self.status = status - self.results = results + self.completed_at = completed_at if requested_at is not None: self.requested_at = requested_at self.started_at = started_at - self.completed_at = completed_at if links is not None: self.links = links + self.results = results + self.status = status @property - def status(self): - """Gets the status of this BatchResponseTimelineEventResponse. # noqa: E501 - - The status of the batch response. Should always be COMPLETED if processed. # noqa: E501 - - :return: The status of this BatchResponseTimelineEventResponse. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchResponseTimelineEventResponse. - - The status of the batch response. Should always be COMPLETED if processed. # noqa: E501 - - :param status: The status of this BatchResponseTimelineEventResponse. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 - - self._status = status - - @property - def results(self): - """Gets the results of this BatchResponseTimelineEventResponse. # noqa: E501 + def completed_at(self): + """Gets the completed_at of this BatchResponseTimelineEventResponse. # noqa: E501 - Successfully created events. # noqa: E501 + The time the request was completed. # noqa: E501 - :return: The results of this BatchResponseTimelineEventResponse. # noqa: E501 - :rtype: list[TimelineEventResponse] + :return: The completed_at of this BatchResponseTimelineEventResponse. # noqa: E501 + :rtype: datetime """ - return self._results + return self._completed_at - @results.setter - def results(self, results): - """Sets the results of this BatchResponseTimelineEventResponse. + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this BatchResponseTimelineEventResponse. - Successfully created events. # noqa: E501 + The time the request was completed. # noqa: E501 - :param results: The results of this BatchResponseTimelineEventResponse. # noqa: E501 - :type results: list[TimelineEventResponse] + :param completed_at: The completed_at of this BatchResponseTimelineEventResponse. # noqa: E501 + :type completed_at: datetime """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 + raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - self._results = results + self._completed_at = completed_at @property def requested_at(self): @@ -163,31 +135,6 @@ def started_at(self, started_at): self._started_at = started_at - @property - def completed_at(self): - """Gets the completed_at of this BatchResponseTimelineEventResponse. # noqa: E501 - - The time the request was completed. # noqa: E501 - - :return: The completed_at of this BatchResponseTimelineEventResponse. # noqa: E501 - :rtype: datetime - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this BatchResponseTimelineEventResponse. - - The time the request was completed. # noqa: E501 - - :param completed_at: The completed_at of this BatchResponseTimelineEventResponse. # noqa: E501 - :type completed_at: datetime - """ - if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 - raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - - self._completed_at = completed_at - @property def links(self): """Gets the links of this BatchResponseTimelineEventResponse. # noqa: E501 @@ -209,6 +156,59 @@ def links(self, links): self._links = links + @property + def results(self): + """Gets the results of this BatchResponseTimelineEventResponse. # noqa: E501 + + Successfully created events. # noqa: E501 + + :return: The results of this BatchResponseTimelineEventResponse. # noqa: E501 + :rtype: list[TimelineEventResponse] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchResponseTimelineEventResponse. + + Successfully created events. # noqa: E501 + + :param results: The results of this BatchResponseTimelineEventResponse. # noqa: E501 + :type results: list[TimelineEventResponse] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + @property + def status(self): + """Gets the status of this BatchResponseTimelineEventResponse. # noqa: E501 + + The status of the batch response. Should always be COMPLETED if processed. # noqa: E501 + + :return: The status of this BatchResponseTimelineEventResponse. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchResponseTimelineEventResponse. + + The status of the batch response. Should always be COMPLETED if processed. # noqa: E501 + + :param status: The status of this BatchResponseTimelineEventResponse. # noqa: E501 + :type status: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 + + self._status = status + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/models/batch_response_timeline_event_response_with_errors.py b/hubspot/crm/timeline/models/batch_response_timeline_event_response_with_errors.py index 7b14f6f6..a3c8c0d5 100644 --- a/hubspot/crm/timeline/models/batch_response_timeline_event_response_with_errors.py +++ b/hubspot/crm/timeline/models/batch_response_timeline_event_response_with_errors.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -36,104 +36,78 @@ class BatchResponseTimelineEventResponseWithErrors(object): and the value is json key in definition. """ openapi_types = { - "status": "str", - "results": "list[TimelineEventResponse]", + "completed_at": "datetime", "num_errors": "int", - "errors": "list[StandardError]", "requested_at": "datetime", "started_at": "datetime", - "completed_at": "datetime", "links": "dict[str, str]", + "results": "list[TimelineEventResponse]", + "errors": "list[StandardError]", + "status": "str", } attribute_map = { - "status": "status", - "results": "results", + "completed_at": "completedAt", "num_errors": "numErrors", - "errors": "errors", "requested_at": "requestedAt", "started_at": "startedAt", - "completed_at": "completedAt", "links": "links", + "results": "results", + "errors": "errors", + "status": "status", } - def __init__(self, status=None, results=None, num_errors=None, errors=None, requested_at=None, started_at=None, completed_at=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, num_errors=None, requested_at=None, started_at=None, links=None, results=None, errors=None, status=None, local_vars_configuration=None): # noqa: E501 """BatchResponseTimelineEventResponseWithErrors - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None - self._results = None + self._completed_at = None self._num_errors = None - self._errors = None self._requested_at = None self._started_at = None - self._completed_at = None self._links = None + self._results = None + self._errors = None + self._status = None self.discriminator = None - self.status = status - self.results = results + self.completed_at = completed_at if num_errors is not None: self.num_errors = num_errors - if errors is not None: - self.errors = errors if requested_at is not None: self.requested_at = requested_at self.started_at = started_at - self.completed_at = completed_at if links is not None: self.links = links + self.results = results + if errors is not None: + self.errors = errors + self.status = status @property - def status(self): - """Gets the status of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - - - :return: The status of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchResponseTimelineEventResponseWithErrors. - - - :param status: The status of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 - - self._status = status - - @property - def results(self): - """Gets the results of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + def completed_at(self): + """Gets the completed_at of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :return: The results of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :rtype: list[TimelineEventResponse] + :return: The completed_at of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + :rtype: datetime """ - return self._results + return self._completed_at - @results.setter - def results(self, results): - """Sets the results of this BatchResponseTimelineEventResponseWithErrors. + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this BatchResponseTimelineEventResponseWithErrors. - :param results: The results of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :type results: list[TimelineEventResponse] + :param completed_at: The completed_at of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + :type completed_at: datetime """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 + raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - self._results = results + self._completed_at = completed_at @property def num_errors(self): @@ -156,27 +130,6 @@ def num_errors(self, num_errors): self._num_errors = num_errors - @property - def errors(self): - """Gets the errors of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - - - :return: The errors of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :rtype: list[StandardError] - """ - return self._errors - - @errors.setter - def errors(self, errors): - """Sets the errors of this BatchResponseTimelineEventResponseWithErrors. - - - :param errors: The errors of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :type errors: list[StandardError] - """ - - self._errors = errors - @property def requested_at(self): """Gets the requested_at of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 @@ -221,29 +174,6 @@ def started_at(self, started_at): self._started_at = started_at - @property - def completed_at(self): - """Gets the completed_at of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - - - :return: The completed_at of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :rtype: datetime - """ - return self._completed_at - - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this BatchResponseTimelineEventResponseWithErrors. - - - :param completed_at: The completed_at of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 - :type completed_at: datetime - """ - if self.local_vars_configuration.client_side_validation and completed_at is None: # noqa: E501 - raise ValueError("Invalid value for `completed_at`, must not be `None`") # noqa: E501 - - self._completed_at = completed_at - @property def links(self): """Gets the links of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 @@ -265,6 +195,76 @@ def links(self, links): self._links = links + @property + def results(self): + """Gets the results of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + + + :return: The results of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + :rtype: list[TimelineEventResponse] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchResponseTimelineEventResponseWithErrors. + + + :param results: The results of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + :type results: list[TimelineEventResponse] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + @property + def errors(self): + """Gets the errors of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + + + :return: The errors of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + :rtype: list[StandardError] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this BatchResponseTimelineEventResponseWithErrors. + + + :param errors: The errors of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + :type errors: list[StandardError] + """ + + self._errors = errors + + @property + def status(self): + """Gets the status of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + + + :return: The status of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchResponseTimelineEventResponseWithErrors. + + + :param status: The status of this BatchResponseTimelineEventResponseWithErrors. # noqa: E501 + :type status: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 + + self._status = status + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/models/collection_response_timeline_event_template_no_paging.py b/hubspot/crm/timeline/models/collection_response_timeline_event_template_no_paging.py index 877c2f2b..b6e8cb59 100644 --- a/hubspot/crm/timeline/models/collection_response_timeline_event_template_no_paging.py +++ b/hubspot/crm/timeline/models/collection_response_timeline_event_template_no_paging.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 diff --git a/hubspot/crm/timeline/models/error.py b/hubspot/crm/timeline/models/error.py index 7e831f96..c367e170 100644 --- a/hubspot/crm/timeline/models/error.py +++ b/hubspot/crm/timeline/models/error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -35,61 +35,82 @@ class Error(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"message": "str", "correlation_id": "str", "category": "str", "sub_category": "str", "errors": "list[ErrorDetail]", "context": "dict[str, list[str]]", "links": "dict[str, str]"} + openapi_types = {"sub_category": "str", "context": "dict[str, list[str]]", "correlation_id": "str", "links": "dict[str, str]", "message": "str", "category": "str", "errors": "list[ErrorDetail]"} - attribute_map = {"message": "message", "correlation_id": "correlationId", "category": "category", "sub_category": "subCategory", "errors": "errors", "context": "context", "links": "links"} + attribute_map = {"sub_category": "subCategory", "context": "context", "correlation_id": "correlationId", "links": "links", "message": "message", "category": "category", "errors": "errors"} - def __init__(self, message=None, correlation_id=None, category=None, sub_category=None, errors=None, context=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, context=None, correlation_id=None, links=None, message=None, category=None, errors=None, local_vars_configuration=None): # noqa: E501 """Error - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._message = None - self._correlation_id = None - self._category = None self._sub_category = None - self._errors = None self._context = None + self._correlation_id = None self._links = None + self._message = None + self._category = None + self._errors = None self.discriminator = None - self.message = message - self.correlation_id = correlation_id - self.category = category if sub_category is not None: self.sub_category = sub_category - if errors is not None: - self.errors = errors if context is not None: self.context = context + self.correlation_id = correlation_id if links is not None: self.links = links + self.message = message + self.category = category + if errors is not None: + self.errors = errors @property - def message(self): - """Gets the message of this Error. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this Error. # noqa: E501 - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The message of this Error. # noqa: E501 + :return: The sub_category of this Error. # noqa: E501 :rtype: str """ - return self._message + return self._sub_category - @message.setter - def message(self, message): - """Sets the message of this Error. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this Error. - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param message: The message of this Error. # noqa: E501 - :type message: str + :param sub_category: The sub_category of this Error. # noqa: E501 + :type sub_category: str """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - self._message = message + self._sub_category = sub_category + + @property + def context(self): + """Gets the context of this Error. # noqa: E501 + + Context about the error condition # noqa: E501 + + :return: The context of this Error. # noqa: E501 + :rtype: dict[str, list[str]] + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this Error. + + Context about the error condition # noqa: E501 + + :param context: The context of this Error. # noqa: E501 + :type context: dict[str, list[str]] + """ + + self._context = context @property def correlation_id(self): @@ -116,6 +137,54 @@ def correlation_id(self, correlation_id): self._correlation_id = correlation_id + @property + def links(self): + """Gets the links of this Error. # noqa: E501 + + A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 + + :return: The links of this Error. # noqa: E501 + :rtype: dict[str, str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this Error. + + A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 + + :param links: The links of this Error. # noqa: E501 + :type links: dict[str, str] + """ + + self._links = links + + @property + def message(self): + """Gets the message of this Error. # noqa: E501 + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :return: The message of this Error. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Error. + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :param message: The message of this Error. # noqa: E501 + :type message: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + @property def category(self): """Gets the category of this Error. # noqa: E501 @@ -141,29 +210,6 @@ def category(self, category): self._category = category - @property - def sub_category(self): - """Gets the sub_category of this Error. # noqa: E501 - - A specific category that contains more specific detail about the error # noqa: E501 - - :return: The sub_category of this Error. # noqa: E501 - :rtype: str - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this Error. - - A specific category that contains more specific detail about the error # noqa: E501 - - :param sub_category: The sub_category of this Error. # noqa: E501 - :type sub_category: str - """ - - self._sub_category = sub_category - @property def errors(self): """Gets the errors of this Error. # noqa: E501 @@ -187,52 +233,6 @@ def errors(self, errors): self._errors = errors - @property - def context(self): - """Gets the context of this Error. # noqa: E501 - - Context about the error condition # noqa: E501 - - :return: The context of this Error. # noqa: E501 - :rtype: dict[str, list[str]] - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this Error. - - Context about the error condition # noqa: E501 - - :param context: The context of this Error. # noqa: E501 - :type context: dict[str, list[str]] - """ - - self._context = context - - @property - def links(self): - """Gets the links of this Error. # noqa: E501 - - A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 - - :return: The links of this Error. # noqa: E501 - :rtype: dict[str, str] - """ - return self._links - - @links.setter - def links(self, links): - """Sets the links of this Error. - - A map of link names to associated URIs containing documentation about the error or recommended remediation steps # noqa: E501 - - :param links: The links of this Error. # noqa: E501 - :type links: dict[str, str] - """ - - self._links = links - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/models/error_category.py b/hubspot/crm/timeline/models/error_category.py deleted file mode 100644 index 3e0f9490..00000000 --- a/hubspot/crm/timeline/models/error_category.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Timeline events - - This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 - - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from hubspot.crm.timeline.configuration import Configuration - - -class ErrorCategory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = {"http_status": "str", "name": "str"} - - attribute_map = {"http_status": "httpStatus", "name": "name"} - - def __init__(self, http_status=None, name=None, local_vars_configuration=None): # noqa: E501 - """ErrorCategory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._http_status = None - self._name = None - self.discriminator = None - - self.http_status = http_status - self.name = name - - @property - def http_status(self): - """Gets the http_status of this ErrorCategory. # noqa: E501 - - - :return: The http_status of this ErrorCategory. # noqa: E501 - :rtype: str - """ - return self._http_status - - @http_status.setter - def http_status(self, http_status): - """Sets the http_status of this ErrorCategory. - - - :param http_status: The http_status of this ErrorCategory. # noqa: E501 - :type http_status: str - """ - if self.local_vars_configuration.client_side_validation and http_status is None: # noqa: E501 - raise ValueError("Invalid value for `http_status`, must not be `None`") # noqa: E501 - allowed_values = [ - "CONTINUE", - "SWITCHING_PROTOCOLS", - "PROCESSING", - "OK", - "CREATED", - "ACCEPTED", - "NON_AUTHORITATIVE_INFORMATION", - "NO_CONTENT", - "RESET_CONTENT", - "PARTIAL_CONTENT", - "MULTI_STATUS", - "ALREADY_REPORTED", - "IM_USED", - "MULTIPLE_CHOICES", - "MOVED_PERMANENTLY", - "FOUND", - "SEE_OTHER", - "NOT_MODIFIED", - "USE_PROXY", - "TEMPORARY_REDIRECT", - "PERMANENT_REDIRECT", - "BAD_REQUEST", - "UNAUTHORIZED", - "PAYMENT_REQUIRED", - "FORBIDDEN", - "NOT_FOUND", - "METHOD_NOT_ALLOWED", - "NOT_ACCEPTABLE", - "PROXY_AUTHENTICATION_REQUIRED", - "REQUEST_TIMEOUT", - "CONFLICT", - "GONE", - "LENGTH_REQUIRED", - "PRECONDITION_FAILED", - "REQUEST_ENTITY_TOO_LARGE", - "REQUEST_URI_TOO_LONG", - "UNSUPPORTED_MEDIA_TYPE", - "REQUESTED_RANGE_NOT_SATISFIABLE", - "EXPECTATION_FAILED", - "IM_A_TEAPOT", - "MISDIRECTED_REQUEST", - "UNPROCESSABLE_ENTITY", - "LOCKED", - "FAILED_DEPENDENCY", - "UPGRADE_REQUIRED", - "PRECONDITION_REQUIRED", - "TOO_MANY_REQUESTS", - "REQUEST_HEADERS_FIELDS_TOO_LARGE", - "INTERNAL_STALE_SERVICE_DISCOVERY", - "UNAVAILABLE_FOR_LEGAL_REASONS", - "MIGRATION_IN_PROGRESS", - "INTERNAL_SERVER_ERROR", - "NOT_IMPLEMENTED", - "BAD_GATEWAY", - "SERVICE_UNAVAILABLE", - "GATEWAY_TIMEOUT", - "HTTP_VERSION_NOT_SUPPORTED", - "VARIANT_ALSO_NEGOTIATES", - "INSUFFICIENT_STORAGE", - "LOOP_DETECTED", - "NOT_EXTENDED", - "NETWORK_AUTHENTICATION_REQUIRED", - ] # noqa: E501 - if self.local_vars_configuration.client_side_validation and http_status not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `http_status` ({0}), must be one of {1}".format(http_status, allowed_values)) # noqa: E501 - - self._http_status = http_status - - @property - def name(self): - """Gets the name of this ErrorCategory. # noqa: E501 - - - :return: The name of this ErrorCategory. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ErrorCategory. - - - :param name: The name of this ErrorCategory. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map(lambda x: convert(x), value)) - elif isinstance(value, dict): - result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items())) - else: - result[attr] = convert(value) - - return result - - 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, ErrorCategory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ErrorCategory): - return True - - return self.to_dict() != other.to_dict() diff --git a/hubspot/crm/timeline/models/error_detail.py b/hubspot/crm/timeline/models/error_detail.py index f3c2dfbe..fcd31641 100644 --- a/hubspot/crm/timeline/models/error_detail.py +++ b/hubspot/crm/timeline/models/error_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -35,80 +35,55 @@ class ErrorDetail(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"message": "str", "_in": "str", "code": "str", "sub_category": "str", "context": "dict[str, list[str]]"} + openapi_types = {"sub_category": "str", "code": "str", "_in": "str", "context": "dict[str, list[str]]", "message": "str"} - attribute_map = {"message": "message", "_in": "in", "code": "code", "sub_category": "subCategory", "context": "context"} + attribute_map = {"sub_category": "subCategory", "code": "code", "_in": "in", "context": "context", "message": "message"} - def __init__(self, message=None, _in=None, code=None, sub_category=None, context=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, code=None, _in=None, context=None, message=None, local_vars_configuration=None): # noqa: E501 """ErrorDetail - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._message = None - self.__in = None - self._code = None self._sub_category = None + self._code = None + self.__in = None self._context = None + self._message = None self.discriminator = None - self.message = message - if _in is not None: - self._in = _in - if code is not None: - self.code = code if sub_category is not None: self.sub_category = sub_category + if code is not None: + self.code = code + if _in is not None: + self._in = _in if context is not None: self.context = context + self.message = message @property - def message(self): - """Gets the message of this ErrorDetail. # noqa: E501 - - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - - :return: The message of this ErrorDetail. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ErrorDetail. - - A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - - :param message: The message of this ErrorDetail. # noqa: E501 - :type message: str - """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def _in(self): - """Gets the _in of this ErrorDetail. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this ErrorDetail. # noqa: E501 - The name of the field or parameter in which the error was found. # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The _in of this ErrorDetail. # noqa: E501 + :return: The sub_category of this ErrorDetail. # noqa: E501 :rtype: str """ - return self.__in + return self._sub_category - @_in.setter - def _in(self, _in): - """Sets the _in of this ErrorDetail. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this ErrorDetail. - The name of the field or parameter in which the error was found. # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param _in: The _in of this ErrorDetail. # noqa: E501 - :type _in: str + :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 + :type sub_category: str """ - self.__in = _in + self._sub_category = sub_category @property def code(self): @@ -134,27 +109,27 @@ def code(self, code): self._code = code @property - def sub_category(self): - """Gets the sub_category of this ErrorDetail. # noqa: E501 + def _in(self): + """Gets the _in of this ErrorDetail. # noqa: E501 - A specific category that contains more specific detail about the error # noqa: E501 + The name of the field or parameter in which the error was found. # noqa: E501 - :return: The sub_category of this ErrorDetail. # noqa: E501 + :return: The _in of this ErrorDetail. # noqa: E501 :rtype: str """ - return self._sub_category + return self.__in - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this ErrorDetail. + @_in.setter + def _in(self, _in): + """Sets the _in of this ErrorDetail. - A specific category that contains more specific detail about the error # noqa: E501 + The name of the field or parameter in which the error was found. # noqa: E501 - :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 - :type sub_category: str + :param _in: The _in of this ErrorDetail. # noqa: E501 + :type _in: str """ - self._sub_category = sub_category + self.__in = _in @property def context(self): @@ -179,6 +154,31 @@ def context(self, context): self._context = context + @property + def message(self): + """Gets the message of this ErrorDetail. # noqa: E501 + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :return: The message of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ErrorDetail. + + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 + + :param message: The message of this ErrorDetail. # noqa: E501 + :type message: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/models/event_detail.py b/hubspot/crm/timeline/models/event_detail.py index bc6bdcb9..08d2d47b 100644 --- a/hubspot/crm/timeline/models/event_detail.py +++ b/hubspot/crm/timeline/models/event_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 diff --git a/hubspot/crm/timeline/models/standard_error.py b/hubspot/crm/timeline/models/standard_error.py index 22eed908..79f952c6 100644 --- a/hubspot/crm/timeline/models/standard_error.py +++ b/hubspot/crm/timeline/models/standard_error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -36,67 +36,111 @@ class StandardError(object): and the value is json key in definition. """ openapi_types = { - "status": "str", - "id": "str", - "category": "ErrorCategory", "sub_category": "object", - "message": "str", - "errors": "list[ErrorDetail]", "context": "dict[str, list[str]]", "links": "dict[str, str]", + "id": "str", + "category": "str", + "message": "str", + "errors": "list[ErrorDetail]", + "status": "str", } - attribute_map = {"status": "status", "id": "id", "category": "category", "sub_category": "subCategory", "message": "message", "errors": "errors", "context": "context", "links": "links"} + attribute_map = {"sub_category": "subCategory", "context": "context", "links": "links", "id": "id", "category": "category", "message": "message", "errors": "errors", "status": "status"} - def __init__(self, status=None, id=None, category=None, sub_category=None, message=None, errors=None, context=None, links=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, sub_category=None, context=None, links=None, id=None, category=None, message=None, errors=None, status=None, local_vars_configuration=None): # noqa: E501 """StandardError - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._status = None + self._sub_category = None + self._context = None + self._links = None self._id = None self._category = None - self._sub_category = None self._message = None self._errors = None - self._context = None - self._links = None + self._status = None self.discriminator = None - self.status = status + if sub_category is not None: + self.sub_category = sub_category + self.context = context + self.links = links if id is not None: self.id = id self.category = category - if sub_category is not None: - self.sub_category = sub_category self.message = message self.errors = errors - self.context = context - self.links = links + self.status = status @property - def status(self): - """Gets the status of this StandardError. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this StandardError. # noqa: E501 - :return: The status of this StandardError. # noqa: E501 - :rtype: str + :return: The sub_category of this StandardError. # noqa: E501 + :rtype: object """ - return self._status + return self._sub_category - @status.setter - def status(self, status): - """Sets the status of this StandardError. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this StandardError. - :param status: The status of this StandardError. # noqa: E501 - :type status: str + :param sub_category: The sub_category of this StandardError. # noqa: E501 + :type sub_category: object """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._status = status + self._sub_category = sub_category + + @property + def context(self): + """Gets the context of this StandardError. # noqa: E501 + + + :return: The context of this StandardError. # noqa: E501 + :rtype: dict[str, list[str]] + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this StandardError. + + + :param context: The context of this StandardError. # noqa: E501 + :type context: dict[str, list[str]] + """ + if self.local_vars_configuration.client_side_validation and context is None: # noqa: E501 + raise ValueError("Invalid value for `context`, must not be `None`") # noqa: E501 + + self._context = context + + @property + def links(self): + """Gets the links of this StandardError. # noqa: E501 + + + :return: The links of this StandardError. # noqa: E501 + :rtype: dict[str, str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this StandardError. + + + :param links: The links of this StandardError. # noqa: E501 + :type links: dict[str, str] + """ + if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 + raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + + self._links = links @property def id(self): @@ -125,7 +169,7 @@ def category(self): :return: The category of this StandardError. # noqa: E501 - :rtype: ErrorCategory + :rtype: str """ return self._category @@ -135,34 +179,13 @@ def category(self, category): :param category: The category of this StandardError. # noqa: E501 - :type category: ErrorCategory + :type category: str """ if self.local_vars_configuration.client_side_validation and category is None: # noqa: E501 raise ValueError("Invalid value for `category`, must not be `None`") # noqa: E501 self._category = category - @property - def sub_category(self): - """Gets the sub_category of this StandardError. # noqa: E501 - - - :return: The sub_category of this StandardError. # noqa: E501 - :rtype: object - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this StandardError. - - - :param sub_category: The sub_category of this StandardError. # noqa: E501 - :type sub_category: object - """ - - self._sub_category = sub_category - @property def message(self): """Gets the message of this StandardError. # noqa: E501 @@ -210,50 +233,27 @@ def errors(self, errors): self._errors = errors @property - def context(self): - """Gets the context of this StandardError. # noqa: E501 - - - :return: The context of this StandardError. # noqa: E501 - :rtype: dict[str, list[str]] - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this StandardError. - - - :param context: The context of this StandardError. # noqa: E501 - :type context: dict[str, list[str]] - """ - if self.local_vars_configuration.client_side_validation and context is None: # noqa: E501 - raise ValueError("Invalid value for `context`, must not be `None`") # noqa: E501 - - self._context = context - - @property - def links(self): - """Gets the links of this StandardError. # noqa: E501 + def status(self): + """Gets the status of this StandardError. # noqa: E501 - :return: The links of this StandardError. # noqa: E501 - :rtype: dict[str, str] + :return: The status of this StandardError. # noqa: E501 + :rtype: str """ - return self._links + return self._status - @links.setter - def links(self, links): - """Sets the links of this StandardError. + @status.setter + def status(self, status): + """Sets the status of this StandardError. - :param links: The links of this StandardError. # noqa: E501 - :type links: dict[str, str] + :param status: The status of this StandardError. # noqa: E501 + :type status: str """ - if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 - raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._links = links + self._status = status def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/timeline/models/timeline_event.py b/hubspot/crm/timeline/models/timeline_event.py index 73fe2787..f1f88316 100644 --- a/hubspot/crm/timeline/models/timeline_event.py +++ b/hubspot/crm/timeline/models/timeline_event.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -37,32 +37,32 @@ class TimelineEvent(object): """ openapi_types = { "event_template_id": "str", - "email": "str", - "object_id": "str", - "utk": "str", - "domain": "str", - "timestamp": "datetime", - "tokens": "dict[str, str]", "extra_data": "object", "timeline_i_frame": "TimelineEventIFrame", + "domain": "str", + "tokens": "dict[str, str]", "id": "str", + "utk": "str", + "email": "str", + "object_id": "str", + "timestamp": "datetime", } attribute_map = { "event_template_id": "eventTemplateId", - "email": "email", - "object_id": "objectId", - "utk": "utk", - "domain": "domain", - "timestamp": "timestamp", - "tokens": "tokens", "extra_data": "extraData", "timeline_i_frame": "timelineIFrame", + "domain": "domain", + "tokens": "tokens", "id": "id", + "utk": "utk", + "email": "email", + "object_id": "objectId", + "timestamp": "timestamp", } def __init__( - self, event_template_id=None, email=None, object_id=None, utk=None, domain=None, timestamp=None, tokens=None, extra_data=None, timeline_i_frame=None, id=None, local_vars_configuration=None + self, event_template_id=None, extra_data=None, timeline_i_frame=None, domain=None, tokens=None, id=None, utk=None, email=None, object_id=None, timestamp=None, local_vars_configuration=None ): # noqa: E501 """TimelineEvent - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: @@ -70,35 +70,35 @@ def __init__( self.local_vars_configuration = local_vars_configuration self._event_template_id = None - self._email = None - self._object_id = None - self._utk = None - self._domain = None - self._timestamp = None - self._tokens = None self._extra_data = None self._timeline_i_frame = None + self._domain = None + self._tokens = None self._id = None + self._utk = None + self._email = None + self._object_id = None + self._timestamp = None self.discriminator = None self.event_template_id = event_template_id - if email is not None: - self.email = email - if object_id is not None: - self.object_id = object_id - if utk is not None: - self.utk = utk - if domain is not None: - self.domain = domain - if timestamp is not None: - self.timestamp = timestamp - self.tokens = tokens if extra_data is not None: self.extra_data = extra_data if timeline_i_frame is not None: self.timeline_i_frame = timeline_i_frame + if domain is not None: + self.domain = domain + self.tokens = tokens if id is not None: self.id = id + if utk is not None: + self.utk = utk + if email is not None: + self.email = email + if object_id is not None: + self.object_id = object_id + if timestamp is not None: + self.timestamp = timestamp @property def event_template_id(self): @@ -126,73 +126,48 @@ def event_template_id(self, event_template_id): self._event_template_id = event_template_id @property - def email(self): - """Gets the email of this TimelineEvent. # noqa: E501 - - The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). # noqa: E501 - - :return: The email of this TimelineEvent. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this TimelineEvent. - - The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). # noqa: E501 - - :param email: The email of this TimelineEvent. # noqa: E501 - :type email: str - """ - - self._email = email - - @property - def object_id(self): - """Gets the object_id of this TimelineEvent. # noqa: E501 + def extra_data(self): + """Gets the extra_data of this TimelineEvent. # noqa: E501 - The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). # noqa: E501 + Additional event-specific data that can be interpreted by the template's markdown. # noqa: E501 - :return: The object_id of this TimelineEvent. # noqa: E501 - :rtype: str + :return: The extra_data of this TimelineEvent. # noqa: E501 + :rtype: object """ - return self._object_id + return self._extra_data - @object_id.setter - def object_id(self, object_id): - """Sets the object_id of this TimelineEvent. + @extra_data.setter + def extra_data(self, extra_data): + """Sets the extra_data of this TimelineEvent. - The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). # noqa: E501 + Additional event-specific data that can be interpreted by the template's markdown. # noqa: E501 - :param object_id: The object_id of this TimelineEvent. # noqa: E501 - :type object_id: str + :param extra_data: The extra_data of this TimelineEvent. # noqa: E501 + :type extra_data: object """ - self._object_id = object_id + self._extra_data = extra_data @property - def utk(self): - """Gets the utk of this TimelineEvent. # noqa: E501 + def timeline_i_frame(self): + """Gets the timeline_i_frame of this TimelineEvent. # noqa: E501 - Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. # noqa: E501 - :return: The utk of this TimelineEvent. # noqa: E501 - :rtype: str + :return: The timeline_i_frame of this TimelineEvent. # noqa: E501 + :rtype: TimelineEventIFrame """ - return self._utk + return self._timeline_i_frame - @utk.setter - def utk(self, utk): - """Sets the utk of this TimelineEvent. + @timeline_i_frame.setter + def timeline_i_frame(self, timeline_i_frame): + """Sets the timeline_i_frame of this TimelineEvent. - Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. # noqa: E501 - :param utk: The utk of this TimelineEvent. # noqa: E501 - :type utk: str + :param timeline_i_frame: The timeline_i_frame of this TimelineEvent. # noqa: E501 + :type timeline_i_frame: TimelineEventIFrame """ - self._utk = utk + self._timeline_i_frame = timeline_i_frame @property def domain(self): @@ -217,29 +192,6 @@ def domain(self, domain): self._domain = domain - @property - def timestamp(self): - """Gets the timestamp of this TimelineEvent. # noqa: E501 - - The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. # noqa: E501 - - :return: The timestamp of this TimelineEvent. # noqa: E501 - :rtype: datetime - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this TimelineEvent. - - The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. # noqa: E501 - - :param timestamp: The timestamp of this TimelineEvent. # noqa: E501 - :type timestamp: datetime - """ - - self._timestamp = timestamp - @property def tokens(self): """Gets the tokens of this TimelineEvent. # noqa: E501 @@ -266,71 +218,119 @@ def tokens(self, tokens): self._tokens = tokens @property - def extra_data(self): - """Gets the extra_data of this TimelineEvent. # noqa: E501 + def id(self): + """Gets the id of this TimelineEvent. # noqa: E501 - Additional event-specific data that can be interpreted by the template's markdown. # noqa: E501 + Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. # noqa: E501 - :return: The extra_data of this TimelineEvent. # noqa: E501 - :rtype: object + :return: The id of this TimelineEvent. # noqa: E501 + :rtype: str """ - return self._extra_data + return self._id - @extra_data.setter - def extra_data(self, extra_data): - """Sets the extra_data of this TimelineEvent. + @id.setter + def id(self, id): + """Sets the id of this TimelineEvent. - Additional event-specific data that can be interpreted by the template's markdown. # noqa: E501 + Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. # noqa: E501 - :param extra_data: The extra_data of this TimelineEvent. # noqa: E501 - :type extra_data: object + :param id: The id of this TimelineEvent. # noqa: E501 + :type id: str """ - self._extra_data = extra_data + self._id = id @property - def timeline_i_frame(self): - """Gets the timeline_i_frame of this TimelineEvent. # noqa: E501 + def utk(self): + """Gets the utk of this TimelineEvent. # noqa: E501 + Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. # noqa: E501 - :return: The timeline_i_frame of this TimelineEvent. # noqa: E501 - :rtype: TimelineEventIFrame + :return: The utk of this TimelineEvent. # noqa: E501 + :rtype: str """ - return self._timeline_i_frame + return self._utk - @timeline_i_frame.setter - def timeline_i_frame(self, timeline_i_frame): - """Sets the timeline_i_frame of this TimelineEvent. + @utk.setter + def utk(self, utk): + """Sets the utk of this TimelineEvent. + Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. # noqa: E501 - :param timeline_i_frame: The timeline_i_frame of this TimelineEvent. # noqa: E501 - :type timeline_i_frame: TimelineEventIFrame + :param utk: The utk of this TimelineEvent. # noqa: E501 + :type utk: str """ - self._timeline_i_frame = timeline_i_frame + self._utk = utk @property - def id(self): - """Gets the id of this TimelineEvent. # noqa: E501 + def email(self): + """Gets the email of this TimelineEvent. # noqa: E501 - Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. # noqa: E501 + The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). # noqa: E501 - :return: The id of this TimelineEvent. # noqa: E501 + :return: The email of this TimelineEvent. # noqa: E501 :rtype: str """ - return self._id + return self._email - @id.setter - def id(self, id): - """Sets the id of this TimelineEvent. + @email.setter + def email(self, email): + """Sets the email of this TimelineEvent. - Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. # noqa: E501 + The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). # noqa: E501 - :param id: The id of this TimelineEvent. # noqa: E501 - :type id: str + :param email: The email of this TimelineEvent. # noqa: E501 + :type email: str """ - self._id = id + self._email = email + + @property + def object_id(self): + """Gets the object_id of this TimelineEvent. # noqa: E501 + + The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). # noqa: E501 + + :return: The object_id of this TimelineEvent. # noqa: E501 + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """Sets the object_id of this TimelineEvent. + + The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). # noqa: E501 + + :param object_id: The object_id of this TimelineEvent. # noqa: E501 + :type object_id: str + """ + + self._object_id = object_id + + @property + def timestamp(self): + """Gets the timestamp of this TimelineEvent. # noqa: E501 + + The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. # noqa: E501 + + :return: The timestamp of this TimelineEvent. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this TimelineEvent. + + The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. # noqa: E501 + + :param timestamp: The timestamp of this TimelineEvent. # noqa: E501 + :type timestamp: datetime + """ + + self._timestamp = timestamp def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/crm/timeline/models/timeline_event_i_frame.py b/hubspot/crm/timeline/models/timeline_event_i_frame.py index e11ca59c..5f795ed6 100644 --- a/hubspot/crm/timeline/models/timeline_event_i_frame.py +++ b/hubspot/crm/timeline/models/timeline_event_i_frame.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -35,11 +35,11 @@ class TimelineEventIFrame(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"link_label": "str", "header_label": "str", "url": "str", "width": "int", "height": "int"} + openapi_types = {"link_label": "str", "header_label": "str", "width": "int", "url": "str", "height": "int"} - attribute_map = {"link_label": "linkLabel", "header_label": "headerLabel", "url": "url", "width": "width", "height": "height"} + attribute_map = {"link_label": "linkLabel", "header_label": "headerLabel", "width": "width", "url": "url", "height": "height"} - def __init__(self, link_label=None, header_label=None, url=None, width=None, height=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, link_label=None, header_label=None, width=None, url=None, height=None, local_vars_configuration=None): # noqa: E501 """TimelineEventIFrame - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -47,15 +47,15 @@ def __init__(self, link_label=None, header_label=None, url=None, width=None, hei self._link_label = None self._header_label = None - self._url = None self._width = None + self._url = None self._height = None self.discriminator = None self.link_label = link_label self.header_label = header_label - self.url = url self.width = width + self.url = url self.height = height @property @@ -108,31 +108,6 @@ def header_label(self, header_label): self._header_label = header_label - @property - def url(self): - """Gets the url of this TimelineEventIFrame. # noqa: E501 - - The URI of the iframe contents. # noqa: E501 - - :return: The url of this TimelineEventIFrame. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this TimelineEventIFrame. - - The URI of the iframe contents. # noqa: E501 - - :param url: The url of this TimelineEventIFrame. # noqa: E501 - :type url: str - """ - if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - - self._url = url - @property def width(self): """Gets the width of this TimelineEventIFrame. # noqa: E501 @@ -158,6 +133,31 @@ def width(self, width): self._width = width + @property + def url(self): + """Gets the url of this TimelineEventIFrame. # noqa: E501 + + The URI of the iframe contents. # noqa: E501 + + :return: The url of this TimelineEventIFrame. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this TimelineEventIFrame. + + The URI of the iframe contents. # noqa: E501 + + :param url: The url of this TimelineEventIFrame. # noqa: E501 + :type url: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + @property def height(self): """Gets the height of this TimelineEventIFrame. # noqa: E501 diff --git a/hubspot/crm/timeline/models/timeline_event_response.py b/hubspot/crm/timeline/models/timeline_event_response.py index 5b39a31e..2a2cceeb 100644 --- a/hubspot/crm/timeline/models/timeline_event_response.py +++ b/hubspot/crm/timeline/models/timeline_event_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -36,49 +36,49 @@ class TimelineEventResponse(object): and the value is json key in definition. """ openapi_types = { - "id": "str", "event_template_id": "str", + "created_at": "datetime", + "extra_data": "object", + "timeline_i_frame": "TimelineEventIFrame", + "domain": "str", + "tokens": "dict[str, str]", + "id": "str", + "utk": "str", "email": "str", "object_id": "str", - "utk": "str", - "domain": "str", "timestamp": "datetime", - "tokens": "dict[str, str]", - "extra_data": "object", - "timeline_i_frame": "TimelineEventIFrame", "object_type": "str", - "created_at": "datetime", } attribute_map = { - "id": "id", "event_template_id": "eventTemplateId", + "created_at": "createdAt", + "extra_data": "extraData", + "timeline_i_frame": "timelineIFrame", + "domain": "domain", + "tokens": "tokens", + "id": "id", + "utk": "utk", "email": "email", "object_id": "objectId", - "utk": "utk", - "domain": "domain", "timestamp": "timestamp", - "tokens": "tokens", - "extra_data": "extraData", - "timeline_i_frame": "timelineIFrame", "object_type": "objectType", - "created_at": "createdAt", } def __init__( self, - id=None, event_template_id=None, + created_at=None, + extra_data=None, + timeline_i_frame=None, + domain=None, + tokens=None, + id=None, + utk=None, email=None, object_id=None, - utk=None, - domain=None, timestamp=None, - tokens=None, - extra_data=None, - timeline_i_frame=None, object_type=None, - created_at=None, local_vars_configuration=None, ): # noqa: E501 """TimelineEventResponse - a model defined in OpenAPI""" # noqa: E501 @@ -86,65 +86,40 @@ def __init__( local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._id = None self._event_template_id = None + self._created_at = None + self._extra_data = None + self._timeline_i_frame = None + self._domain = None + self._tokens = None + self._id = None + self._utk = None self._email = None self._object_id = None - self._utk = None - self._domain = None self._timestamp = None - self._tokens = None - self._extra_data = None - self._timeline_i_frame = None self._object_type = None - self._created_at = None self.discriminator = None - self.id = id self.event_template_id = event_template_id + if created_at is not None: + self.created_at = created_at + if extra_data is not None: + self.extra_data = extra_data + if timeline_i_frame is not None: + self.timeline_i_frame = timeline_i_frame + if domain is not None: + self.domain = domain + self.tokens = tokens + self.id = id + if utk is not None: + self.utk = utk if email is not None: self.email = email if object_id is not None: self.object_id = object_id - if utk is not None: - self.utk = utk - if domain is not None: - self.domain = domain if timestamp is not None: self.timestamp = timestamp - self.tokens = tokens - if extra_data is not None: - self.extra_data = extra_data - if timeline_i_frame is not None: - self.timeline_i_frame = timeline_i_frame self.object_type = object_type - if created_at is not None: - self.created_at = created_at - - @property - def id(self): - """Gets the id of this TimelineEventResponse. # noqa: E501 - - Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. # noqa: E501 - - :return: The id of this TimelineEventResponse. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TimelineEventResponse. - - Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. # noqa: E501 - - :param id: The id of this TimelineEventResponse. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id @property def event_template_id(self): @@ -172,73 +147,69 @@ def event_template_id(self, event_template_id): self._event_template_id = event_template_id @property - def email(self): - """Gets the email of this TimelineEventResponse. # noqa: E501 + def created_at(self): + """Gets the created_at of this TimelineEventResponse. # noqa: E501 - The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). # noqa: E501 - :return: The email of this TimelineEventResponse. # noqa: E501 - :rtype: str + :return: The created_at of this TimelineEventResponse. # noqa: E501 + :rtype: datetime """ - return self._email + return self._created_at - @email.setter - def email(self, email): - """Sets the email of this TimelineEventResponse. + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TimelineEventResponse. - The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). # noqa: E501 - :param email: The email of this TimelineEventResponse. # noqa: E501 - :type email: str + :param created_at: The created_at of this TimelineEventResponse. # noqa: E501 + :type created_at: datetime """ - self._email = email + self._created_at = created_at @property - def object_id(self): - """Gets the object_id of this TimelineEventResponse. # noqa: E501 + def extra_data(self): + """Gets the extra_data of this TimelineEventResponse. # noqa: E501 - The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). # noqa: E501 + Additional event-specific data that can be interpreted by the template's markdown. # noqa: E501 - :return: The object_id of this TimelineEventResponse. # noqa: E501 - :rtype: str + :return: The extra_data of this TimelineEventResponse. # noqa: E501 + :rtype: object """ - return self._object_id + return self._extra_data - @object_id.setter - def object_id(self, object_id): - """Sets the object_id of this TimelineEventResponse. + @extra_data.setter + def extra_data(self, extra_data): + """Sets the extra_data of this TimelineEventResponse. - The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). # noqa: E501 + Additional event-specific data that can be interpreted by the template's markdown. # noqa: E501 - :param object_id: The object_id of this TimelineEventResponse. # noqa: E501 - :type object_id: str + :param extra_data: The extra_data of this TimelineEventResponse. # noqa: E501 + :type extra_data: object """ - self._object_id = object_id + self._extra_data = extra_data @property - def utk(self): - """Gets the utk of this TimelineEventResponse. # noqa: E501 + def timeline_i_frame(self): + """Gets the timeline_i_frame of this TimelineEventResponse. # noqa: E501 - Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. # noqa: E501 - :return: The utk of this TimelineEventResponse. # noqa: E501 - :rtype: str + :return: The timeline_i_frame of this TimelineEventResponse. # noqa: E501 + :rtype: TimelineEventIFrame """ - return self._utk + return self._timeline_i_frame - @utk.setter - def utk(self, utk): - """Sets the utk of this TimelineEventResponse. + @timeline_i_frame.setter + def timeline_i_frame(self, timeline_i_frame): + """Sets the timeline_i_frame of this TimelineEventResponse. - Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. # noqa: E501 - :param utk: The utk of this TimelineEventResponse. # noqa: E501 - :type utk: str + :param timeline_i_frame: The timeline_i_frame of this TimelineEventResponse. # noqa: E501 + :type timeline_i_frame: TimelineEventIFrame """ - self._utk = utk + self._timeline_i_frame = timeline_i_frame @property def domain(self): @@ -263,29 +234,6 @@ def domain(self, domain): self._domain = domain - @property - def timestamp(self): - """Gets the timestamp of this TimelineEventResponse. # noqa: E501 - - The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. # noqa: E501 - - :return: The timestamp of this TimelineEventResponse. # noqa: E501 - :rtype: datetime - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this TimelineEventResponse. - - The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. # noqa: E501 - - :param timestamp: The timestamp of this TimelineEventResponse. # noqa: E501 - :type timestamp: datetime - """ - - self._timestamp = timestamp - @property def tokens(self): """Gets the tokens of this TimelineEventResponse. # noqa: E501 @@ -312,48 +260,121 @@ def tokens(self, tokens): self._tokens = tokens @property - def extra_data(self): - """Gets the extra_data of this TimelineEventResponse. # noqa: E501 + def id(self): + """Gets the id of this TimelineEventResponse. # noqa: E501 - Additional event-specific data that can be interpreted by the template's markdown. # noqa: E501 + Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. # noqa: E501 - :return: The extra_data of this TimelineEventResponse. # noqa: E501 - :rtype: object + :return: The id of this TimelineEventResponse. # noqa: E501 + :rtype: str """ - return self._extra_data + return self._id - @extra_data.setter - def extra_data(self, extra_data): - """Sets the extra_data of this TimelineEventResponse. + @id.setter + def id(self, id): + """Sets the id of this TimelineEventResponse. - Additional event-specific data that can be interpreted by the template's markdown. # noqa: E501 + Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. # noqa: E501 - :param extra_data: The extra_data of this TimelineEventResponse. # noqa: E501 - :type extra_data: object + :param id: The id of this TimelineEventResponse. # noqa: E501 + :type id: str """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._extra_data = extra_data + self._id = id @property - def timeline_i_frame(self): - """Gets the timeline_i_frame of this TimelineEventResponse. # noqa: E501 + def utk(self): + """Gets the utk of this TimelineEventResponse. # noqa: E501 + Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. # noqa: E501 - :return: The timeline_i_frame of this TimelineEventResponse. # noqa: E501 - :rtype: TimelineEventIFrame + :return: The utk of this TimelineEventResponse. # noqa: E501 + :rtype: str """ - return self._timeline_i_frame + return self._utk - @timeline_i_frame.setter - def timeline_i_frame(self, timeline_i_frame): - """Sets the timeline_i_frame of this TimelineEventResponse. + @utk.setter + def utk(self, utk): + """Sets the utk of this TimelineEventResponse. + Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. # noqa: E501 - :param timeline_i_frame: The timeline_i_frame of this TimelineEventResponse. # noqa: E501 - :type timeline_i_frame: TimelineEventIFrame + :param utk: The utk of this TimelineEventResponse. # noqa: E501 + :type utk: str """ - self._timeline_i_frame = timeline_i_frame + self._utk = utk + + @property + def email(self): + """Gets the email of this TimelineEventResponse. # noqa: E501 + + The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). # noqa: E501 + + :return: The email of this TimelineEventResponse. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this TimelineEventResponse. + + The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). # noqa: E501 + + :param email: The email of this TimelineEventResponse. # noqa: E501 + :type email: str + """ + + self._email = email + + @property + def object_id(self): + """Gets the object_id of this TimelineEventResponse. # noqa: E501 + + The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). # noqa: E501 + + :return: The object_id of this TimelineEventResponse. # noqa: E501 + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """Sets the object_id of this TimelineEventResponse. + + The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). # noqa: E501 + + :param object_id: The object_id of this TimelineEventResponse. # noqa: E501 + :type object_id: str + """ + + self._object_id = object_id + + @property + def timestamp(self): + """Gets the timestamp of this TimelineEventResponse. # noqa: E501 + + The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. # noqa: E501 + + :return: The timestamp of this TimelineEventResponse. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this TimelineEventResponse. + + The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. # noqa: E501 + + :param timestamp: The timestamp of this TimelineEventResponse. # noqa: E501 + :type timestamp: datetime + """ + + self._timestamp = timestamp @property def object_type(self): @@ -380,27 +401,6 @@ def object_type(self, object_type): self._object_type = object_type - @property - def created_at(self): - """Gets the created_at of this TimelineEventResponse. # noqa: E501 - - - :return: The created_at of this TimelineEventResponse. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this TimelineEventResponse. - - - :param created_at: The created_at of this TimelineEventResponse. # noqa: E501 - :type created_at: datetime - """ - - self._created_at = created_at - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/models/timeline_event_template.py b/hubspot/crm/timeline/models/timeline_event_template.py index c5211d57..3708624b 100644 --- a/hubspot/crm/timeline/models/timeline_event_template.py +++ b/hubspot/crm/timeline/models/timeline_event_template.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -36,103 +36,78 @@ class TimelineEventTemplate(object): and the value is json key in definition. """ openapi_types = { - "name": "str", - "header_template": "str", + "created_at": "datetime", "detail_template": "str", + "name": "str", "tokens": "list[TimelineEventTemplateToken]", "id": "str", + "header_template": "str", "object_type": "str", - "created_at": "datetime", "updated_at": "datetime", } attribute_map = { - "name": "name", - "header_template": "headerTemplate", + "created_at": "createdAt", "detail_template": "detailTemplate", + "name": "name", "tokens": "tokens", "id": "id", + "header_template": "headerTemplate", "object_type": "objectType", - "created_at": "createdAt", "updated_at": "updatedAt", } - def __init__(self, name=None, header_template=None, detail_template=None, tokens=None, id=None, object_type=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, created_at=None, detail_template=None, name=None, tokens=None, id=None, header_template=None, object_type=None, updated_at=None, local_vars_configuration=None): # noqa: E501 """TimelineEventTemplate - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._name = None - self._header_template = None + self._created_at = None self._detail_template = None + self._name = None self._tokens = None self._id = None + self._header_template = None self._object_type = None - self._created_at = None self._updated_at = None self.discriminator = None - self.name = name - if header_template is not None: - self.header_template = header_template + if created_at is not None: + self.created_at = created_at if detail_template is not None: self.detail_template = detail_template + self.name = name self.tokens = tokens self.id = id + if header_template is not None: + self.header_template = header_template self.object_type = object_type - if created_at is not None: - self.created_at = created_at if updated_at is not None: self.updated_at = updated_at @property - def name(self): - """Gets the name of this TimelineEventTemplate. # noqa: E501 - - The template name. # noqa: E501 - - :return: The name of this TimelineEventTemplate. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TimelineEventTemplate. - - The template name. # noqa: E501 - - :param name: The name of this TimelineEventTemplate. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def header_template(self): - """Gets the header_template of this TimelineEventTemplate. # noqa: E501 + def created_at(self): + """Gets the created_at of this TimelineEventTemplate. # noqa: E501 - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 + The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. # noqa: E501 - :return: The header_template of this TimelineEventTemplate. # noqa: E501 - :rtype: str + :return: The created_at of this TimelineEventTemplate. # noqa: E501 + :rtype: datetime """ - return self._header_template + return self._created_at - @header_template.setter - def header_template(self, header_template): - """Sets the header_template of this TimelineEventTemplate. + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TimelineEventTemplate. - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 + The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. # noqa: E501 - :param header_template: The header_template of this TimelineEventTemplate. # noqa: E501 - :type header_template: str + :param created_at: The created_at of this TimelineEventTemplate. # noqa: E501 + :type created_at: datetime """ - self._header_template = header_template + self._created_at = created_at @property def detail_template(self): @@ -157,6 +132,31 @@ def detail_template(self, detail_template): self._detail_template = detail_template + @property + def name(self): + """Gets the name of this TimelineEventTemplate. # noqa: E501 + + The template name. # noqa: E501 + + :return: The name of this TimelineEventTemplate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TimelineEventTemplate. + + The template name. # noqa: E501 + + :param name: The name of this TimelineEventTemplate. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + @property def tokens(self): """Gets the tokens of this TimelineEventTemplate. # noqa: E501 @@ -207,6 +207,29 @@ def id(self, id): self._id = id + @property + def header_template(self): + """Gets the header_template of this TimelineEventTemplate. # noqa: E501 + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 + + :return: The header_template of this TimelineEventTemplate. # noqa: E501 + :rtype: str + """ + return self._header_template + + @header_template.setter + def header_template(self, header_template): + """Sets the header_template of this TimelineEventTemplate. + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 + + :param header_template: The header_template of this TimelineEventTemplate. # noqa: E501 + :type header_template: str + """ + + self._header_template = header_template + @property def object_type(self): """Gets the object_type of this TimelineEventTemplate. # noqa: E501 @@ -232,29 +255,6 @@ def object_type(self, object_type): self._object_type = object_type - @property - def created_at(self): - """Gets the created_at of this TimelineEventTemplate. # noqa: E501 - - The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. # noqa: E501 - - :return: The created_at of this TimelineEventTemplate. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this TimelineEventTemplate. - - The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. # noqa: E501 - - :param created_at: The created_at of this TimelineEventTemplate. # noqa: E501 - :type created_at: datetime - """ - - self._created_at = created_at - @property def updated_at(self): """Gets the updated_at of this TimelineEventTemplate. # noqa: E501 diff --git a/hubspot/crm/timeline/models/timeline_event_template_create_request.py b/hubspot/crm/timeline/models/timeline_event_template_create_request.py index e33a969d..c753da16 100644 --- a/hubspot/crm/timeline/models/timeline_event_template_create_request.py +++ b/hubspot/crm/timeline/models/timeline_event_template_create_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -35,31 +35,54 @@ class TimelineEventTemplateCreateRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"name": "str", "header_template": "str", "detail_template": "str", "tokens": "list[TimelineEventTemplateToken]", "object_type": "str"} + openapi_types = {"detail_template": "str", "name": "str", "tokens": "list[TimelineEventTemplateToken]", "header_template": "str", "object_type": "str"} - attribute_map = {"name": "name", "header_template": "headerTemplate", "detail_template": "detailTemplate", "tokens": "tokens", "object_type": "objectType"} + attribute_map = {"detail_template": "detailTemplate", "name": "name", "tokens": "tokens", "header_template": "headerTemplate", "object_type": "objectType"} - def __init__(self, name=None, header_template=None, detail_template=None, tokens=None, object_type=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, detail_template=None, name=None, tokens=None, header_template=None, object_type=None, local_vars_configuration=None): # noqa: E501 """TimelineEventTemplateCreateRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._name = None - self._header_template = None self._detail_template = None + self._name = None self._tokens = None + self._header_template = None self._object_type = None self.discriminator = None - self.name = name - if header_template is not None: - self.header_template = header_template if detail_template is not None: self.detail_template = detail_template + self.name = name self.tokens = tokens + if header_template is not None: + self.header_template = header_template self.object_type = object_type + @property + def detail_template(self): + """Gets the detail_template of this TimelineEventTemplateCreateRequest. # noqa: E501 + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. # noqa: E501 + + :return: The detail_template of this TimelineEventTemplateCreateRequest. # noqa: E501 + :rtype: str + """ + return self._detail_template + + @detail_template.setter + def detail_template(self, detail_template): + """Sets the detail_template of this TimelineEventTemplateCreateRequest. + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. # noqa: E501 + + :param detail_template: The detail_template of this TimelineEventTemplateCreateRequest. # noqa: E501 + :type detail_template: str + """ + + self._detail_template = detail_template + @property def name(self): """Gets the name of this TimelineEventTemplateCreateRequest. # noqa: E501 @@ -85,52 +108,6 @@ def name(self, name): self._name = name - @property - def header_template(self): - """Gets the header_template of this TimelineEventTemplateCreateRequest. # noqa: E501 - - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 - - :return: The header_template of this TimelineEventTemplateCreateRequest. # noqa: E501 - :rtype: str - """ - return self._header_template - - @header_template.setter - def header_template(self, header_template): - """Sets the header_template of this TimelineEventTemplateCreateRequest. - - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 - - :param header_template: The header_template of this TimelineEventTemplateCreateRequest. # noqa: E501 - :type header_template: str - """ - - self._header_template = header_template - - @property - def detail_template(self): - """Gets the detail_template of this TimelineEventTemplateCreateRequest. # noqa: E501 - - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. # noqa: E501 - - :return: The detail_template of this TimelineEventTemplateCreateRequest. # noqa: E501 - :rtype: str - """ - return self._detail_template - - @detail_template.setter - def detail_template(self, detail_template): - """Sets the detail_template of this TimelineEventTemplateCreateRequest. - - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. # noqa: E501 - - :param detail_template: The detail_template of this TimelineEventTemplateCreateRequest. # noqa: E501 - :type detail_template: str - """ - - self._detail_template = detail_template - @property def tokens(self): """Gets the tokens of this TimelineEventTemplateCreateRequest. # noqa: E501 @@ -156,6 +133,29 @@ def tokens(self, tokens): self._tokens = tokens + @property + def header_template(self): + """Gets the header_template of this TimelineEventTemplateCreateRequest. # noqa: E501 + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 + + :return: The header_template of this TimelineEventTemplateCreateRequest. # noqa: E501 + :rtype: str + """ + return self._header_template + + @header_template.setter + def header_template(self, header_template): + """Sets the header_template of this TimelineEventTemplateCreateRequest. + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 + + :param header_template: The header_template of this TimelineEventTemplateCreateRequest. # noqa: E501 + :type header_template: str + """ + + self._header_template = header_template + @property def object_type(self): """Gets the object_type of this TimelineEventTemplateCreateRequest. # noqa: E501 diff --git a/hubspot/crm/timeline/models/timeline_event_template_token.py b/hubspot/crm/timeline/models/timeline_event_template_token.py index e3dc77b4..3938746b 100644 --- a/hubspot/crm/timeline/models/timeline_event_template_token.py +++ b/hubspot/crm/timeline/models/timeline_event_template_token.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -36,90 +36,66 @@ class TimelineEventTemplateToken(object): and the value is json key in definition. """ openapi_types = { - "label": "str", - "object_property_name": "str", + "created_at": "datetime", "options": "list[TimelineEventTemplateTokenOption]", "name": "str", + "label": "str", + "object_property_name": "str", "type": "str", - "created_at": "datetime", "updated_at": "datetime", } - attribute_map = {"label": "label", "object_property_name": "objectPropertyName", "options": "options", "name": "name", "type": "type", "created_at": "createdAt", "updated_at": "updatedAt"} + attribute_map = {"created_at": "createdAt", "options": "options", "name": "name", "label": "label", "object_property_name": "objectPropertyName", "type": "type", "updated_at": "updatedAt"} - def __init__(self, label=None, object_property_name=None, options=None, name=None, type=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, created_at=None, options=None, name=None, label=None, object_property_name=None, type=None, updated_at=None, local_vars_configuration=None): # noqa: E501 """TimelineEventTemplateToken - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._label = None - self._object_property_name = None + self._created_at = None self._options = None self._name = None + self._label = None + self._object_property_name = None self._type = None - self._created_at = None self._updated_at = None self.discriminator = None + if created_at is not None: + self.created_at = created_at + if options is not None: + self.options = options + self.name = name self.label = label if object_property_name is not None: self.object_property_name = object_property_name - self.options = options - self.name = name self.type = type - if created_at is not None: - self.created_at = created_at if updated_at is not None: self.updated_at = updated_at @property - def label(self): - """Gets the label of this TimelineEventTemplateToken. # noqa: E501 - - Used for list segmentation and reporting. # noqa: E501 - - :return: The label of this TimelineEventTemplateToken. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this TimelineEventTemplateToken. - - Used for list segmentation and reporting. # noqa: E501 - - :param label: The label of this TimelineEventTemplateToken. # noqa: E501 - :type label: str - """ - if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 - raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 - - self._label = label - - @property - def object_property_name(self): - """Gets the object_property_name of this TimelineEventTemplateToken. # noqa: E501 + def created_at(self): + """Gets the created_at of this TimelineEventTemplateToken. # noqa: E501 - The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API. # noqa: E501 + The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. # noqa: E501 - :return: The object_property_name of this TimelineEventTemplateToken. # noqa: E501 - :rtype: str + :return: The created_at of this TimelineEventTemplateToken. # noqa: E501 + :rtype: datetime """ - return self._object_property_name + return self._created_at - @object_property_name.setter - def object_property_name(self, object_property_name): - """Sets the object_property_name of this TimelineEventTemplateToken. + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TimelineEventTemplateToken. - The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API. # noqa: E501 + The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. # noqa: E501 - :param object_property_name: The object_property_name of this TimelineEventTemplateToken. # noqa: E501 - :type object_property_name: str + :param created_at: The created_at of this TimelineEventTemplateToken. # noqa: E501 + :type created_at: datetime """ - self._object_property_name = object_property_name + self._created_at = created_at @property def options(self): @@ -141,8 +117,6 @@ def options(self, options): :param options: The options of this TimelineEventTemplateToken. # noqa: E501 :type options: list[TimelineEventTemplateTokenOption] """ - if self.local_vars_configuration.client_side_validation and options is None: # noqa: E501 - raise ValueError("Invalid value for `options`, must not be `None`") # noqa: E501 self._options = options @@ -171,6 +145,54 @@ def name(self, name): self._name = name + @property + def label(self): + """Gets the label of this TimelineEventTemplateToken. # noqa: E501 + + Used for list segmentation and reporting. # noqa: E501 + + :return: The label of this TimelineEventTemplateToken. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this TimelineEventTemplateToken. + + Used for list segmentation and reporting. # noqa: E501 + + :param label: The label of this TimelineEventTemplateToken. # noqa: E501 + :type label: str + """ + if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 + raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 + + self._label = label + + @property + def object_property_name(self): + """Gets the object_property_name of this TimelineEventTemplateToken. # noqa: E501 + + The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API. # noqa: E501 + + :return: The object_property_name of this TimelineEventTemplateToken. # noqa: E501 + :rtype: str + """ + return self._object_property_name + + @object_property_name.setter + def object_property_name(self, object_property_name): + """Sets the object_property_name of this TimelineEventTemplateToken. + + The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API. # noqa: E501 + + :param object_property_name: The object_property_name of this TimelineEventTemplateToken. # noqa: E501 + :type object_property_name: str + """ + + self._object_property_name = object_property_name + @property def type(self): """Gets the type of this TimelineEventTemplateToken. # noqa: E501 @@ -199,29 +221,6 @@ def type(self, type): self._type = type - @property - def created_at(self): - """Gets the created_at of this TimelineEventTemplateToken. # noqa: E501 - - The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. # noqa: E501 - - :return: The created_at of this TimelineEventTemplateToken. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this TimelineEventTemplateToken. - - The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. # noqa: E501 - - :param created_at: The created_at of this TimelineEventTemplateToken. # noqa: E501 - :type created_at: datetime - """ - - self._created_at = created_at - @property def updated_at(self): """Gets the updated_at of this TimelineEventTemplateToken. # noqa: E501 diff --git a/hubspot/crm/timeline/models/timeline_event_template_token_option.py b/hubspot/crm/timeline/models/timeline_event_template_token_option.py index 563d7606..d00ef3e8 100644 --- a/hubspot/crm/timeline/models/timeline_event_template_token_option.py +++ b/hubspot/crm/timeline/models/timeline_event_template_token_option.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -35,45 +35,22 @@ class TimelineEventTemplateTokenOption(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"value": "str", "label": "str"} + openapi_types = {"label": "str", "value": "str"} - attribute_map = {"value": "value", "label": "label"} + attribute_map = {"label": "label", "value": "value"} - def __init__(self, value=None, label=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, label=None, value=None, local_vars_configuration=None): # noqa: E501 """TimelineEventTemplateTokenOption - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._value = None self._label = None + self._value = None self.discriminator = None - self.value = value self.label = label - - @property - def value(self): - """Gets the value of this TimelineEventTemplateTokenOption. # noqa: E501 - - - :return: The value of this TimelineEventTemplateTokenOption. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this TimelineEventTemplateTokenOption. - - - :param value: The value of this TimelineEventTemplateTokenOption. # noqa: E501 - :type value: str - """ - if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - - self._value = value + self.value = value @property def label(self): @@ -98,6 +75,29 @@ def label(self, label): self._label = label + @property + def value(self): + """Gets the value of this TimelineEventTemplateTokenOption. # noqa: E501 + + + :return: The value of this TimelineEventTemplateTokenOption. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this TimelineEventTemplateTokenOption. + + + :param value: The value of this TimelineEventTemplateTokenOption. # noqa: E501 + :type value: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/models/timeline_event_template_token_update_request.py b/hubspot/crm/timeline/models/timeline_event_template_token_update_request.py index 9d338071..c4de7e01 100644 --- a/hubspot/crm/timeline/models/timeline_event_template_token_update_request.py +++ b/hubspot/crm/timeline/models/timeline_event_template_token_update_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -35,25 +35,49 @@ class TimelineEventTemplateTokenUpdateRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"label": "str", "object_property_name": "str", "options": "list[TimelineEventTemplateTokenOption]"} + openapi_types = {"options": "list[TimelineEventTemplateTokenOption]", "label": "str", "object_property_name": "str"} - attribute_map = {"label": "label", "object_property_name": "objectPropertyName", "options": "options"} + attribute_map = {"options": "options", "label": "label", "object_property_name": "objectPropertyName"} - def __init__(self, label=None, object_property_name=None, options=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, options=None, label=None, object_property_name=None, local_vars_configuration=None): # noqa: E501 """TimelineEventTemplateTokenUpdateRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration + self._options = None self._label = None self._object_property_name = None - self._options = None self.discriminator = None + if options is not None: + self.options = options self.label = label if object_property_name is not None: self.object_property_name = object_property_name - self.options = options + + @property + def options(self): + """Gets the options of this TimelineEventTemplateTokenUpdateRequest. # noqa: E501 + + If type is `enumeration`, we should have a list of options to choose from. # noqa: E501 + + :return: The options of this TimelineEventTemplateTokenUpdateRequest. # noqa: E501 + :rtype: list[TimelineEventTemplateTokenOption] + """ + return self._options + + @options.setter + def options(self, options): + """Sets the options of this TimelineEventTemplateTokenUpdateRequest. + + If type is `enumeration`, we should have a list of options to choose from. # noqa: E501 + + :param options: The options of this TimelineEventTemplateTokenUpdateRequest. # noqa: E501 + :type options: list[TimelineEventTemplateTokenOption] + """ + + self._options = options @property def label(self): @@ -103,31 +127,6 @@ def object_property_name(self, object_property_name): self._object_property_name = object_property_name - @property - def options(self): - """Gets the options of this TimelineEventTemplateTokenUpdateRequest. # noqa: E501 - - If type is `enumeration`, we should have a list of options to choose from. # noqa: E501 - - :return: The options of this TimelineEventTemplateTokenUpdateRequest. # noqa: E501 - :rtype: list[TimelineEventTemplateTokenOption] - """ - return self._options - - @options.setter - def options(self, options): - """Sets the options of this TimelineEventTemplateTokenUpdateRequest. - - If type is `enumeration`, we should have a list of options to choose from. # noqa: E501 - - :param options: The options of this TimelineEventTemplateTokenUpdateRequest. # noqa: E501 - :type options: list[TimelineEventTemplateTokenOption] - """ - if self.local_vars_configuration.client_side_validation and options is None: # noqa: E501 - raise ValueError("Invalid value for `options`, must not be `None`") # noqa: E501 - - self._options = options - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/models/timeline_event_template_update_request.py b/hubspot/crm/timeline/models/timeline_event_template_update_request.py index 022b25a9..facdd137 100644 --- a/hubspot/crm/timeline/models/timeline_event_template_update_request.py +++ b/hubspot/crm/timeline/models/timeline_event_template_update_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501 @@ -35,30 +35,53 @@ class TimelineEventTemplateUpdateRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"name": "str", "header_template": "str", "detail_template": "str", "tokens": "list[TimelineEventTemplateToken]", "id": "str"} + openapi_types = {"detail_template": "str", "name": "str", "tokens": "list[TimelineEventTemplateToken]", "id": "str", "header_template": "str"} - attribute_map = {"name": "name", "header_template": "headerTemplate", "detail_template": "detailTemplate", "tokens": "tokens", "id": "id"} + attribute_map = {"detail_template": "detailTemplate", "name": "name", "tokens": "tokens", "id": "id", "header_template": "headerTemplate"} - def __init__(self, name=None, header_template=None, detail_template=None, tokens=None, id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, detail_template=None, name=None, tokens=None, id=None, header_template=None, local_vars_configuration=None): # noqa: E501 """TimelineEventTemplateUpdateRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._name = None - self._header_template = None self._detail_template = None + self._name = None self._tokens = None self._id = None + self._header_template = None self.discriminator = None - self.name = name - if header_template is not None: - self.header_template = header_template if detail_template is not None: self.detail_template = detail_template + self.name = name self.tokens = tokens self.id = id + if header_template is not None: + self.header_template = header_template + + @property + def detail_template(self): + """Gets the detail_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. # noqa: E501 + + :return: The detail_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 + :rtype: str + """ + return self._detail_template + + @detail_template.setter + def detail_template(self, detail_template): + """Sets the detail_template of this TimelineEventTemplateUpdateRequest. + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. # noqa: E501 + + :param detail_template: The detail_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 + :type detail_template: str + """ + + self._detail_template = detail_template @property def name(self): @@ -85,52 +108,6 @@ def name(self, name): self._name = name - @property - def header_template(self): - """Gets the header_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 - - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 - - :return: The header_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 - :rtype: str - """ - return self._header_template - - @header_template.setter - def header_template(self, header_template): - """Sets the header_template of this TimelineEventTemplateUpdateRequest. - - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 - - :param header_template: The header_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 - :type header_template: str - """ - - self._header_template = header_template - - @property - def detail_template(self): - """Gets the detail_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 - - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. # noqa: E501 - - :return: The detail_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 - :rtype: str - """ - return self._detail_template - - @detail_template.setter - def detail_template(self, detail_template): - """Sets the detail_template of this TimelineEventTemplateUpdateRequest. - - This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. # noqa: E501 - - :param detail_template: The detail_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 - :type detail_template: str - """ - - self._detail_template = detail_template - @property def tokens(self): """Gets the tokens of this TimelineEventTemplateUpdateRequest. # noqa: E501 @@ -181,6 +158,29 @@ def id(self, id): self._id = id + @property + def header_template(self): + """Gets the header_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 + + :return: The header_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 + :rtype: str + """ + return self._header_template + + @header_template.setter + def header_template(self, header_template): + """Sets the header_template of this TimelineEventTemplateUpdateRequest. + + This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. # noqa: E501 + + :param header_template: The header_template of this TimelineEventTemplateUpdateRequest. # noqa: E501 + :type header_template: str + """ + + self._header_template = header_template + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/crm/timeline/rest.py b/hubspot/crm/timeline/rest.py index cf437c16..b6d4a84f 100644 --- a/hubspot/crm/timeline/rest.py +++ b/hubspot/crm/timeline/rest.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Timeline events + CRM Timeline This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. # noqa: E501