Skip to content

Commit b98765c

Browse files
committed
Update package version to 1.0-rc.5 and generated from the latest API specifications
1 parent 9ece264 commit b98765c

File tree

76 files changed

+3718
-543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3718
-543
lines changed

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project_name_override: nadag-innmelding-python-client
22
package_name_override: nadag_innmelding_python_client
3-
package_version_override: 1.0-rc.4
3+
package_version_override: 1.0-rc.5
44
post_hooks:
55
# - "bash -c 'cd field-manager-python-client && poetry install'"

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_nadag_innmelding_v_1_geoteknisk_borehull.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Optional, Union
2+
from typing import Any, Optional, Union, cast
33

44
import httpx
55

@@ -33,12 +33,20 @@ def _get_kwargs(
3333

3434
def _parse_response(
3535
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
36-
) -> Optional[GeotekniskBorehull]:
36+
) -> Optional[Union[Any, GeotekniskBorehull]]:
3737
if response.status_code == 200:
3838
response_200 = GeotekniskBorehull.from_dict(response.json())
3939

4040
return response_200
4141

42+
if response.status_code == 401:
43+
response_401 = cast(Any, None)
44+
return response_401
45+
46+
if response.status_code == 404:
47+
response_404 = cast(Any, None)
48+
return response_404
49+
4250
if client.raise_on_unexpected_status:
4351
raise errors.UnexpectedStatus(response.status_code, response.content)
4452
else:
@@ -47,7 +55,7 @@ def _parse_response(
4755

4856
def _build_response(
4957
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
50-
) -> Response[GeotekniskBorehull]:
58+
) -> Response[Union[Any, GeotekniskBorehull]]:
5159
return Response(
5260
status_code=HTTPStatus(response.status_code),
5361
content=response.content,
@@ -61,7 +69,7 @@ def sync_detailed(
6169
client: Union[AuthenticatedClient, Client],
6270
ekstern_id: str,
6371
ekstern_navnerom: str,
64-
) -> Response[GeotekniskBorehull]:
72+
) -> Response[Union[Any, GeotekniskBorehull]]:
6573
"""Fetches a GeotekniskBorehull by external id.
6674
6775
Fetches a GeotekniskBorehull by external id.
@@ -75,7 +83,7 @@ def sync_detailed(
7583
httpx.TimeoutException: If the request takes longer than Client.timeout.
7684
7785
Returns:
78-
Response[GeotekniskBorehull]
86+
Response[Union[Any, GeotekniskBorehull]]
7987
"""
8088

8189
kwargs = _get_kwargs(
@@ -95,7 +103,7 @@ def sync(
95103
client: Union[AuthenticatedClient, Client],
96104
ekstern_id: str,
97105
ekstern_navnerom: str,
98-
) -> Optional[GeotekniskBorehull]:
106+
) -> Optional[Union[Any, GeotekniskBorehull]]:
99107
"""Fetches a GeotekniskBorehull by external id.
100108
101109
Fetches a GeotekniskBorehull by external id.
@@ -109,7 +117,7 @@ def sync(
109117
httpx.TimeoutException: If the request takes longer than Client.timeout.
110118
111119
Returns:
112-
GeotekniskBorehull
120+
Union[Any, GeotekniskBorehull]
113121
"""
114122

115123
return sync_detailed(
@@ -124,7 +132,7 @@ async def asyncio_detailed(
124132
client: Union[AuthenticatedClient, Client],
125133
ekstern_id: str,
126134
ekstern_navnerom: str,
127-
) -> Response[GeotekniskBorehull]:
135+
) -> Response[Union[Any, GeotekniskBorehull]]:
128136
"""Fetches a GeotekniskBorehull by external id.
129137
130138
Fetches a GeotekniskBorehull by external id.
@@ -138,7 +146,7 @@ async def asyncio_detailed(
138146
httpx.TimeoutException: If the request takes longer than Client.timeout.
139147
140148
Returns:
141-
Response[GeotekniskBorehull]
149+
Response[Union[Any, GeotekniskBorehull]]
142150
"""
143151

144152
kwargs = _get_kwargs(
@@ -156,7 +164,7 @@ async def asyncio(
156164
client: Union[AuthenticatedClient, Client],
157165
ekstern_id: str,
158166
ekstern_navnerom: str,
159-
) -> Optional[GeotekniskBorehull]:
167+
) -> Optional[Union[Any, GeotekniskBorehull]]:
160168
"""Fetches a GeotekniskBorehull by external id.
161169
162170
Fetches a GeotekniskBorehull by external id.
@@ -170,7 +178,7 @@ async def asyncio(
170178
httpx.TimeoutException: If the request takes longer than Client.timeout.
171179
172180
Returns:
173-
GeotekniskBorehull
181+
Union[Any, GeotekniskBorehull]
174182
"""
175183

176184
return (

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_nadag_innmelding_v_1_geoteknisk_borehull_geoteknisk_borehull_id.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ def _parse_response(
3232
response_401 = cast(Any, None)
3333
return response_401
3434

35+
if response.status_code == 404:
36+
response_404 = cast(Any, None)
37+
return response_404
38+
3539
if client.raise_on_unexpected_status:
3640
raise errors.UnexpectedStatus(response.status_code, response.content)
3741
else:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
from http import HTTPStatus
2+
from typing import Any, Optional, Union, cast
3+
4+
import httpx
5+
6+
from ... import errors
7+
from ...client import AuthenticatedClient, Client
8+
from ...models.geoteknisk_borehull import GeotekniskBorehull
9+
from ...types import Response
10+
11+
12+
def _get_kwargs(
13+
geoteknisk_unders_id: str,
14+
geoteknisk_borehull_id: str,
15+
) -> dict[str, Any]:
16+
_kwargs: dict[str, Any] = {
17+
"method": "get",
18+
"url": f"/nadag/innmelding/v1/GeotekniskUnders/{geoteknisk_unders_id}/undersPkt/{geoteknisk_borehull_id}",
19+
}
20+
21+
return _kwargs
22+
23+
24+
def _parse_response(
25+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
26+
) -> Optional[Union[Any, GeotekniskBorehull]]:
27+
if response.status_code == 200:
28+
response_200 = GeotekniskBorehull.from_dict(response.json())
29+
30+
return response_200
31+
32+
if response.status_code == 401:
33+
response_401 = cast(Any, None)
34+
return response_401
35+
36+
if response.status_code == 404:
37+
response_404 = cast(Any, None)
38+
return response_404
39+
40+
if client.raise_on_unexpected_status:
41+
raise errors.UnexpectedStatus(response.status_code, response.content)
42+
else:
43+
return None
44+
45+
46+
def _build_response(
47+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
48+
) -> Response[Union[Any, GeotekniskBorehull]]:
49+
return Response(
50+
status_code=HTTPStatus(response.status_code),
51+
content=response.content,
52+
headers=response.headers,
53+
parsed=_parse_response(client=client, response=response),
54+
)
55+
56+
57+
def sync_detailed(
58+
geoteknisk_unders_id: str,
59+
geoteknisk_borehull_id: str,
60+
*,
61+
client: AuthenticatedClient,
62+
) -> Response[Union[Any, GeotekniskBorehull]]:
63+
"""Gets a GeotekniskBorehull owned by the latest versjon of a GeotekniskUnders.
64+
65+
Gets a GeotekniskBorehull.
66+
67+
Args:
68+
geoteknisk_unders_id (str):
69+
geoteknisk_borehull_id (str):
70+
71+
Raises:
72+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
73+
httpx.TimeoutException: If the request takes longer than Client.timeout.
74+
75+
Returns:
76+
Response[Union[Any, GeotekniskBorehull]]
77+
"""
78+
79+
kwargs = _get_kwargs(
80+
geoteknisk_unders_id=geoteknisk_unders_id,
81+
geoteknisk_borehull_id=geoteknisk_borehull_id,
82+
)
83+
84+
response = client.get_httpx_client().request(
85+
**kwargs,
86+
)
87+
88+
return _build_response(client=client, response=response)
89+
90+
91+
def sync(
92+
geoteknisk_unders_id: str,
93+
geoteknisk_borehull_id: str,
94+
*,
95+
client: AuthenticatedClient,
96+
) -> Optional[Union[Any, GeotekniskBorehull]]:
97+
"""Gets a GeotekniskBorehull owned by the latest versjon of a GeotekniskUnders.
98+
99+
Gets a GeotekniskBorehull.
100+
101+
Args:
102+
geoteknisk_unders_id (str):
103+
geoteknisk_borehull_id (str):
104+
105+
Raises:
106+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
107+
httpx.TimeoutException: If the request takes longer than Client.timeout.
108+
109+
Returns:
110+
Union[Any, GeotekniskBorehull]
111+
"""
112+
113+
return sync_detailed(
114+
geoteknisk_unders_id=geoteknisk_unders_id,
115+
geoteknisk_borehull_id=geoteknisk_borehull_id,
116+
client=client,
117+
).parsed
118+
119+
120+
async def asyncio_detailed(
121+
geoteknisk_unders_id: str,
122+
geoteknisk_borehull_id: str,
123+
*,
124+
client: AuthenticatedClient,
125+
) -> Response[Union[Any, GeotekniskBorehull]]:
126+
"""Gets a GeotekniskBorehull owned by the latest versjon of a GeotekniskUnders.
127+
128+
Gets a GeotekniskBorehull.
129+
130+
Args:
131+
geoteknisk_unders_id (str):
132+
geoteknisk_borehull_id (str):
133+
134+
Raises:
135+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
136+
httpx.TimeoutException: If the request takes longer than Client.timeout.
137+
138+
Returns:
139+
Response[Union[Any, GeotekniskBorehull]]
140+
"""
141+
142+
kwargs = _get_kwargs(
143+
geoteknisk_unders_id=geoteknisk_unders_id,
144+
geoteknisk_borehull_id=geoteknisk_borehull_id,
145+
)
146+
147+
response = await client.get_async_httpx_client().request(**kwargs)
148+
149+
return _build_response(client=client, response=response)
150+
151+
152+
async def asyncio(
153+
geoteknisk_unders_id: str,
154+
geoteknisk_borehull_id: str,
155+
*,
156+
client: AuthenticatedClient,
157+
) -> Optional[Union[Any, GeotekniskBorehull]]:
158+
"""Gets a GeotekniskBorehull owned by the latest versjon of a GeotekniskUnders.
159+
160+
Gets a GeotekniskBorehull.
161+
162+
Args:
163+
geoteknisk_unders_id (str):
164+
geoteknisk_borehull_id (str):
165+
166+
Raises:
167+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
168+
httpx.TimeoutException: If the request takes longer than Client.timeout.
169+
170+
Returns:
171+
Union[Any, GeotekniskBorehull]
172+
"""
173+
174+
return (
175+
await asyncio_detailed(
176+
geoteknisk_unders_id=geoteknisk_unders_id,
177+
geoteknisk_borehull_id=geoteknisk_borehull_id,
178+
client=client,
179+
)
180+
).parsed

nadag-innmelding-python-client/nadag_innmelding_python_client/models/attachment_info_dto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class AttachmentInfoDto:
1414
"""Attachment info result
1515
1616
Attributes:
17-
attachment_id (Union[Unset, str]):
18-
uniq_id (Union[Unset, str]):
17+
attachment_id (Union[Unset, str]): Identifier for the attachment
18+
uniq_id (Union[Unset, str]): Uniq identifier for the attachment (base64 encoded)
1919
"""
2020

2121
attachment_id: Union[Unset, str] = UNSET

nadag-innmelding-python-client/nadag_innmelding_python_client/models/blokk_proeve.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ class BlokkProeve:
3030
f.eks bygningsnummer.
3131
3232
NOTE 2 Denne unike identifikatoren vil ikke endres i løpet av objektets levetid.
33-
fra_borlengde (Union[Unset, float]):
34-
til_borlengde (Union[Unset, float]):
33+
fra_borlengde (Union[Unset, float]): lengde målt fra toppen av kurven/linja som beskriver borehullforløpet
34+
<engelsk>distance measured from the top of the curve describing the borehole geometry</engelsk>
35+
til_borlengde (Union[Unset, float]): lengde målt fra toppen av kurven/linja som beskriver borehullforløpet
36+
<engelsk>distance measured from the top of the curve describing the borehole geometry</engelsk>
3537
prøvetype (Union[Unset, ProevetakingType]): inndeling av fysisk prøvemateriale i prøvetype, avhengig av
3638
prøvetakingsmetode og/eller lagringsmetode for prøvematerialet<engelsk>separation of physical samples in sample
3739
type classes, depending on sampling method and/or storage method for the sampled material</engelsk>
38-
densitet_pr_ø_vetaking (Union[Unset, float]):
39-
milj_ø_teknisk_unders_ø_kelse (Union[Unset, str]):
40+
densitet_pr_ø_vetaking (Union[Unset, float]): tyngde pr. volumenhet (kN/m3) <engelsk>gravity by unit of space
41+
(kN/m3)</engelsk>
42+
milj_ø_teknisk_unders_ø_kelse (Union[Unset, str]): beskrivelse og resultater fra miljøteknisk undersøkelse
43+
<engelsk>description and results from environmental investigation<engelsk>
4044
"""
4145

4246
json_type: Union[Literal["BlokkProeve"], Unset] = UNSET

nadag-innmelding-python-client/nadag_innmelding_python_client/models/borlengde_til_berg.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ class BorlengdeTilBerg:
2525
<engelsk>
2626
defines the quality of the depth information either assumed or confirmed by a secure method
2727
</engelsk>
28-
borlengde_til_berg (Union[Unset, float]):
28+
borlengde_til_berg (Union[Unset, float]): dybde til fjell som ikke er målt men basert på tolkning
29+
30+
<engelsk>
31+
depth to bedrock based on interpretation
32+
</engelsk>
2933
"""
3034

3135
borlengde_kvalitet: KvalitetBorlengdeTilBerg

0 commit comments

Comments
 (0)