Skip to content

Commit

Permalink
Switch to model_dump_json for to_json method
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-mairose-sp committed Nov 14, 2024
1 parent d850896 commit 3e9fdb8
Show file tree
Hide file tree
Showing 2,220 changed files with 4,434 additions and 4,434 deletions.
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_criteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_criteria_criteria_list_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_access_profile_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_account_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_app_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_approver_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_associated.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_entitlement_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_owner_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_removed.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_requested_for_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_requester_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_reviewed_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_item_role_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_approval_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_bulk_delete_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_bulk_delete_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_source_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_update_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_profile_usage_used_by_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_recommendation_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_request_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_request_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_request_dynamic_approver.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
4 changes: 2 additions & 2 deletions sailpoint/beta/models/access_request_dynamic_approver1.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
return self.model_dump_json(by_alias=True, exclude_unset=True)


@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
Expand Down
Loading

0 comments on commit 3e9fdb8

Please sign in to comment.