- Notifications
You must be signed in to change notification settings - Fork2
Generator: Update SDK /services/stackitmarketplace#2276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Closed
Uh oh!
There was an error while loading.Please reload this page.
Closed
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
8 changes: 8 additions & 0 deletionsservices/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletionsservices/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletionsservices/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
48 changes: 40 additions & 8 deletions...ckitmarketplace/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionsservices/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_form_type.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
129 changes: 129 additions & 0 deletions.../stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_request_private_plan.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| # coding: utf-8 | ||
| """ | ||
| STACKIT Marketplace API | ||
| API to manage STACKIT Marketplace. | ||
| The version of the OpenAPI document: 1 | ||
| Contact: marketplace@stackit.cloud | ||
| Generated by OpenAPI Generator (https://openapi-generator.tech) | ||
| Do not edit the class manually. | ||
| """ # noqa: E501 | ||
| from __future__ import annotations | ||
| import json | ||
| import pprint | ||
| import re # noqa: F401 | ||
| from typing import Any, ClassVar, Dict, List, Optional, Set | ||
| from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator | ||
| from typing_extensions import Annotated, Self | ||
| class InquiryRequestPrivatePlan(BaseModel): | ||
| """ | ||
| Request a private plan. | ||
| """ # noqa: E501 | ||
| company_name: Annotated[str, Field(strict=True, max_length=512)] = Field( | ||
| description="The company name.", alias="companyName" | ||
| ) | ||
| contact_email: StrictStr = Field(description="A e-mail address.", alias="contactEmail") | ||
| full_name: Annotated[str, Field(strict=True, max_length=512)] = Field( | ||
| description="The full name of the contact person.", alias="fullName" | ||
| ) | ||
| message: Annotated[str, Field(strict=True, max_length=512)] = Field(description="A custom message.") | ||
| product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field( | ||
| description="The user-readable product ID.", alias="productId" | ||
| ) | ||
| __properties: ClassVar[List[str]] = ["companyName", "contactEmail", "fullName", "message", "productId"] | ||
| @field_validator("company_name") | ||
| def company_name_validate_regular_expression(cls, value): | ||
| """Validates the regular expression""" | ||
| if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$", value): | ||
| raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/") | ||
| return value | ||
| @field_validator("full_name") | ||
| def full_name_validate_regular_expression(cls, value): | ||
| """Validates the regular expression""" | ||
| if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$", value): | ||
| raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/") | ||
| return value | ||
| @field_validator("message") | ||
| def message_validate_regular_expression(cls, value): | ||
| """Validates the regular expression""" | ||
| if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$", value): | ||
| raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/") | ||
| return value | ||
| @field_validator("product_id") | ||
| def product_id_validate_regular_expression(cls, value): | ||
| """Validates the regular expression""" | ||
| if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value): | ||
| raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/") | ||
| return value | ||
| model_config = ConfigDict( | ||
| populate_by_name=True, | ||
| validate_assignment=True, | ||
| protected_namespaces=(), | ||
| ) | ||
| def to_str(self) -> str: | ||
| """Returns the string representation of the model using alias""" | ||
| return pprint.pformat(self.model_dump(by_alias=True)) | ||
| 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()) | ||
| @classmethod | ||
| def from_json(cls, json_str: str) -> Optional[Self]: | ||
| """Create an instance of InquiryRequestPrivatePlan from a JSON string""" | ||
| return cls.from_dict(json.loads(json_str)) | ||
| def to_dict(self) -> Dict[str, Any]: | ||
| """Return the dictionary representation of the model using alias. | ||
| This has the following differences from calling pydantic's | ||
| `self.model_dump(by_alias=True)`: | ||
| * `None` is only added to the output dict for nullable fields that | ||
| were set at model initialization. Other fields with value `None` | ||
| are ignored. | ||
| """ | ||
| excluded_fields: Set[str] = set([]) | ||
| _dict = self.model_dump( | ||
| by_alias=True, | ||
| exclude=excluded_fields, | ||
| exclude_none=True, | ||
| ) | ||
| return _dict | ||
| @classmethod | ||
| def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: | ||
| """Create an instance of InquiryRequestPrivatePlan from a dict""" | ||
| if obj is None: | ||
| return None | ||
| if not isinstance(obj, dict): | ||
| return cls.model_validate(obj) | ||
| _obj = cls.model_validate( | ||
| { | ||
| "companyName": obj.get("companyName"), | ||
| "contactEmail": obj.get("contactEmail"), | ||
| "fullName": obj.get("fullName"), | ||
| "message": obj.get("message"), | ||
| "productId": obj.get("productId"), | ||
| } | ||
| ) | ||
| return _obj |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.