diff --git a/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts index da81d151b..2d3f6090a 100644 --- a/packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/marshalling.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 randomName from '@scaleway/random-name' import { isJSONObject, resolveOneOf, @@ -381,7 +382,7 @@ export const marshalCreateApplicationRequest = ( defaults: DefaultValues, ): Record => ({ description: request.description, - name: request.name, + name: request.name || randomName('app'), organization_id: request.organizationId ?? defaults.defaultOrganizationId, }) @@ -390,7 +391,7 @@ export const marshalCreateGroupRequest = ( defaults: DefaultValues, ): Record => ({ description: request.description, - name: request.name, + name: request.name || randomName('grp'), organization_id: request.organizationId ?? defaults.defaultOrganizationId, }) @@ -399,7 +400,7 @@ export const marshalCreatePolicyRequest = ( defaults: DefaultValues, ): Record => ({ description: request.description, - name: request.name, + name: request.name || randomName('pol'), organization_id: request.organizationId ?? defaults.defaultOrganizationId, rules: request.rules ? request.rules.map(elt => marshalRuleSpecs(elt, defaults)) @@ -428,7 +429,7 @@ export const marshalCreateSSHKeyRequest = ( request: CreateSSHKeyRequest, defaults: DefaultValues, ): Record => ({ - name: request.name, + name: request.name || randomName('key'), project_id: request.projectId ?? defaults.defaultProjectId, public_key: request.publicKey, }) diff --git a/packages/clients/src/api/iam/v1alpha1/types.gen.ts b/packages/clients/src/api/iam/v1alpha1/types.gen.ts index 8932f9b15..7a64c3a58 100644 --- a/packages/clients/src/api/iam/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/iam/v1alpha1/types.gen.ts @@ -391,7 +391,7 @@ export type ListSSHKeysRequest = { export type CreateSSHKeyRequest = { /** The name of the SSH key. Max length is 1000 */ - name: string + name?: string /** * SSH public key. Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa * keys with NIST curves are supported. Max length is 65000 @@ -455,7 +455,7 @@ export type ListApplicationsRequest = { export type CreateApplicationRequest = { /** Name of application to create (max length is 64 chars) */ - name: string + name?: string /** ID of organization */ organizationId?: string /** Description of application (max length is 200 chars) */ @@ -507,7 +507,7 @@ export type CreateGroupRequest = { * Name of the group to create (max length is 64 chars). MUST be unique inside * an organization */ - name: string + name?: string /** Description of the group to create (max length is 200 chars) */ description: string } @@ -599,7 +599,7 @@ export type ListPoliciesRequest = { export type CreatePolicyRequest = { /** Name of policy to create (max length is 64 chars) */ - name: string + name?: string /** Description of policy to create (max length is 200 chars) */ description: string /** ID of organization */