diff --git a/packages/clients/src/api/iam/v1alpha1/index.gen.ts b/packages/clients/src/api/iam/v1alpha1/index.gen.ts index 0e1b20a7f..80d869148 100644 --- a/packages/clients/src/api/iam/v1alpha1/index.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/index.gen.ts @@ -74,6 +74,7 @@ export type { ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, + LocalityType, LockUserRequest, Log, LogAction, @@ -84,6 +85,7 @@ export type { PermissionSetScopeType, Policy, Quotum, + QuotumLimit, RemoveGroupMemberRequest, Rule, RuleSpecs, diff --git a/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts index b3929d943..d675d2624 100644 --- a/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts @@ -43,6 +43,7 @@ import type { PermissionSet, Policy, Quotum, + QuotumLimit, RemoveGroupMemberRequest, Rule, RuleSpecs, @@ -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( @@ -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, diff --git a/packages/clients/src/api/iam/v1alpha1/types.gen.ts b/packages/clients/src/api/iam/v1alpha1/types.gen.ts index 0ac5b1267..b1451bae1 100644 --- a/packages/clients/src/api/iam/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/types.gen.ts @@ -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' @@ -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 = @@ -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 @@ -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. */ @@ -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 {