-
Notifications
You must be signed in to change notification settings - Fork 2
Generator: Update SDK /services/observability and .../resourcemanager #2449
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2e747b4
Generate observability
stackit-pipeline 22481e9
Generate resourcemanager
stackit-pipeline e5a111d
update changelogs and version
Benjosh95 818fdf0
update changelogs and version
Benjosh95 2882b26
Merge branch 'generator-bot-18647293931/resourcemanager' into bf/upda…
Benjosh95 fb37618
fix changelogs
Benjosh95 e5e3270
fix indentations
Benjosh95 532a079
update changelogs
Benjosh95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
114 changes: 114 additions & 0 deletions
114
...rvability/src/stackit/observability/models/create_logs_alertgroups_payload_rules_inner.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,114 @@ | ||
| # coding: utf-8 | ||
|
|
||
| """ | ||
| STACKIT Observability API | ||
|
|
||
| API endpoints for Observability on STACKIT | ||
|
|
||
| The version of the OpenAPI document: 1.1.1 | ||
| Contact: stackit-argus@mail.schwarz | ||
| Generated by OpenAPI Generator (https://openapi-generator.tech) | ||
|
|
||
| Do not edit the class manually. | ||
| """ # noqa: E501 | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import json | ||
| import pprint | ||
| from typing import Any, ClassVar, Dict, List, Optional, Set | ||
|
|
||
| from pydantic import BaseModel, ConfigDict, Field | ||
| from typing_extensions import Annotated, Self | ||
|
|
||
|
|
||
| class CreateLogsAlertgroupsPayloadRulesInner(BaseModel): | ||
| """ | ||
| Rule definition. Must be either an Alerting Rule (using 'alert') or a Recording Rule (using 'record'). `Additional Validators:` * total config (all alert groups/rules) should not be bigger than 500000 characters as string since this the limitation of prometheus. | ||
| """ # noqa: E501 | ||
|
|
||
| alert: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field( | ||
| default=None, | ||
| description="The name of the alert. When this attribute is used, an Alerting Rule will be created. `Additional Validators:` * is the identifier and so unique in the group * should only include the characters: a-zA-Z0-9- * required when 'record' is not used in this rule, otherwise not allowed", | ||
| ) | ||
| annotations: Optional[Dict[str, Any]] = Field( | ||
| default=None, | ||
| description="Map of key:value. Annotations to add to each alert. `Additional Validators:` * should not contain more than 5 keys * each key and value should not be longer than 200 characters * is not allowed to use when 'record' is used in this rule", | ||
| ) | ||
| expr: Annotated[str, Field(min_length=1, strict=True, max_length=600)] = Field( | ||
| description="The LogQL expression to evaluate to create alerts when using the 'alert' attribute in this rule, or to create a metric when using the 'record' attribute." | ||
| ) | ||
| var_for: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=8)]] = Field( | ||
| default="0s", | ||
| description="Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. `Additional Validators:` * must be a valid time string * is not allowed to use when 'record' is used in this rule", | ||
| alias="for", | ||
| ) | ||
| labels: Optional[Dict[str, Any]] = Field( | ||
| default=None, | ||
| description="Map of key:value. Labels to add or overwrite for each alert or metric. `Additional Validators:` * should not contain more than 10 keys * each key and value should not be longer than 200 characters", | ||
| ) | ||
| record: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = Field( | ||
| default=None, | ||
| description="The name of the metric. When this attribute is used, an Recording Rule will be created. `Additional Validators:` * is the identifier and so unique in the group * should only include the characters: a-zA-Z0-9:_ * required when 'alert' is not used in this rule, otherwise not allowed", | ||
| ) | ||
| __properties: ClassVar[List[str]] = ["alert", "annotations", "expr", "for", "labels", "record"] | ||
|
|
||
| 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 CreateLogsAlertgroupsPayloadRulesInner 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 CreateLogsAlertgroupsPayloadRulesInner from a dict""" | ||
| if obj is None: | ||
| return None | ||
|
|
||
| if not isinstance(obj, dict): | ||
| return cls.model_validate(obj) | ||
|
|
||
| _obj = cls.model_validate( | ||
| { | ||
| "alert": obj.get("alert"), | ||
| "annotations": obj.get("annotations"), | ||
| "expr": obj.get("expr"), | ||
| "for": obj.get("for") if obj.get("for") is not None else "0s", | ||
| "labels": obj.get("labels"), | ||
| "record": obj.get("record"), | ||
| } | ||
| ) | ||
| return _obj |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put the newer version on the top please