Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/clients/src/api/iam/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export type {
ListUsersRequest,
ListUsersRequestOrderBy,
ListUsersResponse,
LocalityType,
LockUserRequest,
Log,
LogAction,
Expand All @@ -84,6 +85,7 @@ export type {
PermissionSetScopeType,
Policy,
Quotum,
QuotumLimit,
RemoveGroupMemberRequest,
Rule,
RuleSpecs,
Expand Down
19 changes: 19 additions & 0 deletions packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import type {
PermissionSet,
Policy,
Quotum,
QuotumLimit,
RemoveGroupMemberRequest,
Rule,
RuleSpecs,
Expand Down Expand Up @@ -200,6 +201,22 @@ export const unmarshalPolicy = (data: unknown): Policy => {
} as Policy
}

const unmarshalQuotumLimit = (data: unknown): QuotumLimit => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'QuotumLimit' failed as data isn't a dictionary.`,
)
}

return {
global: data.global,
limit: data.limit,
region: data.region,
unlimited: data.unlimited,
zone: data.zone,
} as QuotumLimit
}

export const unmarshalQuotum = (data: unknown): Quotum => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand All @@ -210,6 +227,8 @@ export const unmarshalQuotum = (data: unknown): Quotum => {
return {
description: data.description,
limit: data.limit,
limits: unmarshalArrayOfObject(data.limits, unmarshalQuotumLimit),
localityType: data.locality_type,
name: data.name,
prettyName: data.pretty_name,
unit: data.unit,
Expand Down
54 changes: 50 additions & 4 deletions packages/clients/src/api/iam/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file was automatically generated. DO NOT EDIT.
// If you have any remark or suggestion do not hesitate to open an issue.
import type { Region as ScwRegion, Zone as ScwZone } from '../../../bridge'

export type BearerType = 'unknown_bearer_type' | 'user' | 'application'

Expand Down Expand Up @@ -76,6 +77,8 @@ export type ListUsersRequestOrderBy =
| 'username_asc'
| 'username_desc'

export type LocalityType = 'global' | 'region' | 'zone'

export type LogAction = 'unknown_action' | 'created' | 'updated' | 'deleted'

export type LogResourceType =
Expand All @@ -96,6 +99,42 @@ export type UserStatus = 'unknown_status' | 'invitation_pending' | 'activated'

export type UserType = 'unknown_type' | 'guest' | 'owner' | 'member'

export interface QuotumLimit {
/**
* Whether or not the limit is applied globally.
*
* One-of ('locality'): at most one of 'global', 'region', 'zone' could be
* set.
*/
global?: boolean
/**
* The region on which the limit is applied.
*
* One-of ('locality'): at most one of 'global', 'region', 'zone' could be
* set.
*/
region?: ScwRegion
/**
* The zone on which the limit is applied.
*
* One-of ('locality'): at most one of 'global', 'region', 'zone' could be
* set.
*/
zone?: ScwZone
/**
* Maximum locality limit.
*
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
*/
limit?: number
/**
* Whether or not the quota per locality is unlimited.
*
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
*/
unlimited?: boolean
}

export interface JWT {
/** JWT ID. */
jti: string
Expand Down Expand Up @@ -345,15 +384,15 @@ export interface Quotum {
/** Name of the quota. */
name: string
/**
* Maximum limit of the quota.
* @deprecated Maximum limit of the quota.
*
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
*/
limit?: number
/**
* Defines whether or not the quota is unlimited.
* @deprecated Defines whether or not the quota is unlimited.
*
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
*/
unlimited?: boolean
/** A human-readable name for the quota. */
Expand All @@ -362,6 +401,13 @@ export interface Quotum {
unit: string
/** Details about the quota. */
description: string
/**
* Whether this quotum is applied on at the zone level, region level, or
* globally.
*/
localityType: LocalityType
/** Limits per locality. */
limits: QuotumLimit[]
}

export interface Rule {
Expand Down
Loading