/**
 * Google Workspace Admin Node - Version 1
 * Discriminator: resource=user, operation=create
 */


interface Credentials {
  gSuiteAdminOAuth2Api: CredentialReference;
}

/** Create a group */
export type GSuiteAdminV1UserCreateParams = {
  resource: 'user';
  operation: 'create';
/**
 * First Name
 */
    firstName?: string | Expression<string> | PlaceholderValue;
/**
 * Last Name
 */
    lastName?: string | Expression<string> | PlaceholderValue;
/**
 * Stores the password for the user account. A minimum of 8 characters is required. The maximum length is 100 characters.
 */
    password?: string | Expression<string> | PlaceholderValue;
/**
 * The username that will be set to the user. Example: If you domain is example.com and you set the username to n.smith then the user's final email address will be n.smith@example.com.
 */
    username?: string | Expression<string> | PlaceholderValue;
/**
 * Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;
 */
    domain?: string | Expression<string>;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** Whether the user is forced to change their password at next login
     * @default false
     */
    changePasswordAtNextLogin?: boolean | Expression<boolean>;
    /** Phones
     * @default {}
     */
    phoneUi?: {
        /** Phone
     */
    phoneValues?: Array<{
      /** The type of phone number
       * @default work
       */
      type?: 'assistant' | 'callback' | 'car' | 'company_main' | 'custom' | 'grand_central' | 'home' | 'home_fax' | 'isdn' | 'main' | 'mobile' | 'other' | 'other_fax' | 'pager' | 'radio' | 'telex' | 'tty_tdd' | 'work' | 'work_fax' | 'work_mobile' | 'work_pager' | Expression<string>;
      /** Phone Number
       */
      value?: string | Expression<string> | PlaceholderValue;
      /** Whether this is the user's primary phone number
       * @default false
       */
      primary?: boolean | Expression<boolean>;
    }>;
  };
    /** Secondary Emails
     * @default {}
     */
    emailUi?: {
        /** Email
     */
    emailValues?: Array<{
      /** The type of the email account
       * @default work
       */
      type?: 'home' | 'work' | 'other' | Expression<string>;
      /** Email
       */
      address?: string | Expression<string> | PlaceholderValue;
    }>;
  };
    /** Select the roles you want to assign to the user
     * @default []
     */
    roles?: Array<'directorySyncAdmin' | 'groupsAdmin' | 'groupsEditor' | 'groupsReader' | 'helpDeskAdmin' | 'inventoryReportingAdmin' | 'mobileAdmin' | 'servicesAdmin' | 'storageAdmin' | 'superAdmin' | 'userManagement'>;
    /** Allows editing and adding of custom fields
     * @default {}
     */
    customFields?: {
        /** Field
     */
    fieldValues?: Array<{
      /** Select the schema to use for custom fields. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
       */
      schemaName?: string | Expression<string>;
      /** Enter a field name from the selected schema
       */
      fieldName?: string | Expression<string> | PlaceholderValue;
      /** Provide a value for the selected field
       */
      value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
  };
};

export type GSuiteAdminV1UserCreateOutput = {
  creationTime?: string;
  customerId?: string;
  etag?: string;
  id?: string;
  isAdmin?: boolean;
  isDelegatedAdmin?: boolean;
  isMailboxSetup?: boolean;
  kind?: string;
  name?: {
    familyName?: string;
    givenName?: string;
  };
  orgUnitPath?: string;
  primaryEmail?: string;
};

export type GSuiteAdminV1UserCreateNode = {
  type: 'n8n-nodes-base.gSuiteAdmin';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<GSuiteAdminV1UserCreateParams>;
  output?: Items<GSuiteAdminV1UserCreateOutput>;
};