swagger: "2.0"
info:
  title: Core Server API
  version: v1
tags:
  - name: AuditService
  - name: UserService
  - name: AuthService
  - name: CalendarService
  - name: IAMService
  - name: ResourceTagService
consumes:
  - application/json
produces:
  - application/json
paths:
  /api/v1/core/audit-logs:
    get:
      operationId: AuditService_ListAuditLogs
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListAuditLogsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: type
          in: query
          required: false
          type: string
          enum:
            - AUDIT_LOG_TYPE_UNSPECIFIED
            - AUDIT_LOG_TYPE_CHANGE
            - AUDIT_LOG_TYPE_CTL
            - AUDIT_LOG_TYPE_CLUSTER_MAINTENANCE
            - AUDIT_LOG_TYPE_OPERATION
            - AUDIT_LOG_TYPE_JUMP
            - AUDIT_LOG_TYPE_CLOUD_CONFIG_CHANGE
            - AUDIT_LOG_TYPE_CLOUD_CONFIG_DEFAULT_CONFIG_CHANGE
            - AUDIT_LOG_TYPE_K8S_UPGRADE_TASK
            - AUDIT_LOG_TYPE_TENANT
            - AUDIT_LOG_TYPE_SPU_SKU
            - AUDIT_LOG_TYPE_RBAC_ROLE
            - AUDIT_LOG_TYPE_RBAC_ROLE_BINDING
            - AUDIT_LOG_TYPE_IAM_ROLE
            - AUDIT_LOG_TYPE_IAM_ROLE_BINDING
            - AUDIT_LOG_TYPE_IAM_POLICY
            - AUDIT_LOG_TYPE_IAM_POLICY_BINDING
            - AUDIT_LOG_TYPE_IAM_API_KEY
            - AUDIT_LOG_TYPE_AGENT_PROJECT
          default: AUDIT_LOG_TYPE_UNSPECIFIED
        - name: objectIds
          in: query
          required: false
          type: array
          items:
            type: string
          collectionFormat: multi
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - AuditService
    post:
      operationId: AuditService_CreateAuditLog
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1CreateAuditLogResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1CreateAuditLogRequest'
      tags:
        - AuditService
  /api/v1/core/audit-logs/types:
    get:
      operationId: AuditService_ListAuditLogTypes
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListAuditLogTypesResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      tags:
        - AuditService
  /api/v1/core/auth/authenticate:
    post:
      operationId: AuthService_Authenticate
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1AuthenticateResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1AuthenticateRequest'
      tags:
        - AuthService
  /api/v1/core/auth/authorize:
    post:
      operationId: AuthService_Authorize
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1AuthorizeResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1AuthorizeRequest'
      tags:
        - AuthService
  /api/v1/core/calendar/configs:
    get:
      operationId: CalendarService_ListCalendarConfigs
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListCalendarConfigsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - CalendarService
    post:
      operationId: CalendarService_CreateCalendarConfig
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1CreateCalendarConfigResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1CreateCalendarConfigRequest'
      tags:
        - CalendarService
  /api/v1/core/calendar/configs/{name}:
    get:
      operationId: CalendarService_GetCalendarConfig
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetCalendarConfigResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - CalendarService
    delete:
      operationId: CalendarService_DeleteCalendarConfig
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeleteCalendarConfigResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - CalendarService
    put:
      operationId: CalendarService_UpdateCalendarConfig
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1UpdateCalendarConfigResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/CalendarServiceUpdateCalendarConfigBody'
      tags:
        - CalendarService
  /api/v1/core/calendar/events:
    get:
      operationId: CalendarService_ListCalendarEvents
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListCalendarEventsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: query
          required: false
          type: string
        - name: startTime
          in: query
          required: false
          type: string
          format: date-time
        - name: endTime
          in: query
          required: false
          type: string
          format: date-time
      tags:
        - CalendarService
  /api/v1/core/calendar/events/check:
    get:
      operationId: CalendarService_HasCalendarEvent
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1HasCalendarEventResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: query
          required: false
          type: string
        - name: time
          in: query
          required: false
          type: string
          format: date-time
      tags:
        - CalendarService
  /api/v1/core/iam/api-keys:
    get:
      operationId: IAMService_ListAPIKeys
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListAPIKeysResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: nameLike
          in: query
          required: false
          type: string
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - IAMService
    post:
      operationId: IAMService_GenerateAPIKey
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GenerateAPIKeyResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1GenerateAPIKeyRequest'
      tags:
        - IAMService
  /api/v1/core/iam/api-keys/{name}:
    get:
      operationId: IAMService_GetAPIKey
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetAPIKeyResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - IAMService
    delete:
      operationId: IAMService_DeleteAPIKey
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeleteAPIKeyResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - IAMService
  /api/v1/core/iam/api-keys:validate:
    post:
      operationId: IAMService_ValidateAPIKey
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ValidateAPIKeyResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1ValidateAPIKeyRequest'
      tags:
        - IAMService
  /api/v1/core/iam/permissions:resolve:
    post:
      operationId: IAMService_ResolveEntityPermissions
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ResolveEntityPermissionsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1ResolveEntityPermissionsRequest'
      tags:
        - IAMService
  /api/v1/core/iam/policies:
    get:
      operationId: IAMService_ListPolicies
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListPoliciesResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: nameLike
          in: query
          required: false
          type: string
        - name: nameIn
          in: query
          required: false
          type: array
          items:
            type: string
          collectionFormat: multi
        - name: withInline
          in: query
          required: false
          type: boolean
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - IAMService
    post:
      operationId: IAMService_CreatePolicy
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1CreatePolicyResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1CreatePolicyRequest'
      tags:
        - IAMService
  /api/v1/core/iam/policies/{name}:
    get:
      operationId: IAMService_GetPolicy
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetPolicyResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - IAMService
    delete:
      operationId: IAMService_DeletePolicy
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeletePolicyResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - IAMService
    put:
      operationId: IAMService_UpdatePolicy
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1UpdatePolicyResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/IAMServiceUpdatePolicyBody'
      tags:
        - IAMService
  /api/v1/core/iam/policy-bindings:
    get:
      operationId: IAMService_ListPolicyBindings
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListPolicyBindingsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: roleIs
          in: query
          required: false
          type: string
        - name: roleIn
          in: query
          required: false
          type: array
          items:
            type: string
          collectionFormat: multi
        - name: policyIs
          in: query
          required: false
          type: string
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - IAMService
    post:
      operationId: IAMService_BatchCreatePolicyBindings
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1BatchCreatePolicyBindingsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1BatchCreatePolicyBindingsRequest'
      tags:
        - IAMService
  /api/v1/core/iam/policy-bindings:batch-delete:
    post:
      operationId: IAMService_BatchDeletePolicyBindings
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1BatchDeletePolicyBindingsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1BatchDeletePolicyBindingsRequest'
      tags:
        - IAMService
  /api/v1/core/iam/policy-bindings:sync-role:
    post:
      operationId: IAMService_SyncPolicyBindingsForRole
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1SyncPolicyBindingsForRoleResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1SyncPolicyBindingsForRoleRequest'
      tags:
        - IAMService
  /api/v1/core/iam/role-bindings:
    get:
      operationId: IAMService_ListRoleBindings
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListRoleBindingsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: roleIs
          in: query
          required: false
          type: string
        - name: targetIs.type
          in: query
          required: false
          type: string
          enum:
            - ROLE_BINDING_TARGET_TYPE_UNSPECIFIED
            - ROLE_BINDING_TARGET_TYPE_USER
            - ROLE_BINDING_TARGET_TYPE_USER_GROUP
            - ROLE_BINDING_TARGET_TYPE_API_KEY
          default: ROLE_BINDING_TARGET_TYPE_UNSPECIFIED
        - name: targetIs.name
          in: query
          required: false
          type: string
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - IAMService
    post:
      operationId: IAMService_BatchCreateRoleBindings
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1BatchCreateRoleBindingsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1BatchCreateRoleBindingsRequest'
      tags:
        - IAMService
  /api/v1/core/iam/role-bindings:batch-delete:
    post:
      operationId: IAMService_BatchDeleteRoleBindings
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1BatchDeleteRoleBindingsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1BatchDeleteRoleBindingsRequest'
      tags:
        - IAMService
  /api/v1/core/iam/role-bindings:sync-group:
    post:
      operationId: IAMService_SyncRoleBindingsForGroup
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1SyncRoleBindingsForGroupResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1SyncRoleBindingsForGroupRequest'
      tags:
        - IAMService
  /api/v1/core/iam/role-bindings:sync-target:
    post:
      operationId: IAMService_SyncRoleBindingsForTarget
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1SyncRoleBindingsForTargetResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1SyncRoleBindingsForTargetRequest'
      tags:
        - IAMService
  /api/v1/core/iam/roles:
    get:
      operationId: IAMService_ListRoles
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListRolesResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: nameLike
          in: query
          required: false
          type: string
        - name: nameIn
          in: query
          required: false
          type: array
          items:
            type: string
          collectionFormat: multi
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - IAMService
    post:
      operationId: IAMService_CreateRole
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1CreateRoleResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1CreateRoleRequest'
      tags:
        - IAMService
  /api/v1/core/iam/roles/{name}:
    get:
      operationId: IAMService_GetRole
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetRoleResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - IAMService
    delete:
      operationId: IAMService_DeleteRole
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeleteRoleResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - IAMService
    put:
      operationId: IAMService_UpdateRole
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1UpdateRoleResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/IAMServiceUpdateRoleBody'
      tags:
        - IAMService
  /api/v1/core/iam/roles/{name}/permissions:
    get:
      operationId: IAMService_ResolveRolePermissions
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ResolveRolePermissionsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - IAMService
  /api/v1/core/me/apitoken/ip-access-list:
    get:
      operationId: UserService_GetAPITokenIPAccessList
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetAPITokenIPAccessListResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      tags:
        - UserService
    put:
      operationId: UserService_UpsertAPITokenIPAccessList
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1UpsertAPITokenIPAccessListResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1UpsertAPITokenIPAccessListRequest'
      tags:
        - UserService
  /api/v1/core/me/apitoken/tokens:
    get:
      operationId: UserService_ListAPITokens
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListAPITokensResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: nameLike
          in: query
          required: false
          type: string
        - name: statusIs
          in: query
          required: false
          type: string
          enum:
            - API_TOKEN_STATUS_UNSPECIFIED
            - API_TOKEN_STATUS_ACTIVE
            - API_TOKEN_STATUS_INACTIVE
          default: API_TOKEN_STATUS_UNSPECIFIED
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - UserService
    post:
      operationId: UserService_GenerateAPIToken
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GenerateAPITokenResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1GenerateAPITokenRequest'
      tags:
        - UserService
  /api/v1/core/me/apitoken/tokens/{tokenName}:
    get:
      operationId: UserService_GetAPIToken
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetAPITokenResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: tokenName
          in: path
          required: true
          type: string
      tags:
        - UserService
    delete:
      operationId: UserService_DeleteAPIToken
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeleteAPITokenResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: tokenName
          in: path
          required: true
          type: string
      tags:
        - UserService
  /api/v1/core/me/profile:
    get:
      operationId: UserService_CurrentProfile
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1PrincipalProfile'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      tags:
        - UserService
  /api/v1/core/resource-tags:
    get:
      operationId: ResourceTagService_GetResourceTags
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetResourceTagsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: ref.resourceType
          in: query
          required: false
          type: string
          enum:
            - RESOURCE_TYPE_UNSPECIFIED
            - RESOURCE_TYPE_USER_USER_GROUP
          default: RESOURCE_TYPE_UNSPECIFIED
        - name: ref.resourceId
          in: query
          required: false
          type: string
      tags:
        - ResourceTagService
  /api/v1/core/resource-tags/batch-get:
    post:
      operationId: ResourceTagService_BatchGetResourceTags
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1BatchGetResourceTagsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1BatchGetResourceTagsRequest'
      tags:
        - ResourceTagService
  /api/v1/core/resource-tags/search:
    post:
      operationId: ResourceTagService_SearchResources
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1SearchResourcesResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1SearchResourcesRequest'
      tags:
        - ResourceTagService
  /api/v1/core/resource-tags/set:
    post:
      operationId: ResourceTagService_SetResourceTags
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1SetResourceTagsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1SetResourceTagsRequest'
      tags:
        - ResourceTagService
  /api/v1/core/user/groups:
    get:
      operationId: UserService_ListGroups
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListGroupsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: nameLike
          in: query
          required: false
          type: string
        - name: userHave
          in: query
          required: false
          type: string
        - name: sourceIs
          in: query
          required: false
          type: string
          enum:
            - USER_GROUP_SOURCE_UNSPECIFIED
            - USER_GROUP_SOURCE_CUSTOM
            - USER_GROUP_SOURCE_LARK
          default: USER_GROUP_SOURCE_UNSPECIFIED
        - name: withTag
          in: query
          required: false
          type: boolean
        - name: groupKeyword
          in: query
          required: false
          type: string
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
      tags:
        - UserService
    post:
      operationId: UserService_CreateGroup
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1CreateGroupResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1CreateGroupRequest'
      tags:
        - UserService
  /api/v1/core/user/groups/{name}:
    get:
      operationId: UserService_GetGroup
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetGroupResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
      tags:
        - UserService
    delete:
      operationId: UserService_DeleteGroup
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1DeleteGroupResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
        - name: force
          in: query
          required: false
          type: boolean
      tags:
        - UserService
    patch:
      operationId: UserService_UpdateGroup
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1UpdateGroupResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/UserServiceUpdateGroupBody'
      tags:
        - UserService
  /api/v1/core/user/groups/{name}/users:map:
    post:
      operationId: UserService_MapUsersToGroup
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1MapUsersToGroupResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/UserServiceMapUsersToGroupBody'
      tags:
        - UserService
  /api/v1/core/user/groups/{name}/users:unmap:
    post:
      operationId: UserService_UnmapUsersFromGroup
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1UnmapUsersFromGroupResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: name
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/UserServiceUnmapUsersFromGroupBody'
      tags:
        - UserService
  /api/v1/core/user/groups:sync:
    post:
      operationId: UserService_SyncUserGroupsAsync
      responses:
        "200":
          description: A successful response.
          schema:
            type: object
            properties: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1SyncUserGroupsAsyncRequest'
      tags:
        - UserService
  /api/v1/core/user/users:
    get:
      operationId: UserService_ListUsers
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1ListUsersResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: email
          in: query
          required: false
          type: string
        - name: userKeyword
          in: query
          required: false
          type: string
        - name: includeUnavailable
          in: query
          required: false
          type: boolean
        - name: groupIs
          in: query
          required: false
          type: string
        - name: emailIn
          in: query
          required: false
          type: array
          items:
            type: string
          collectionFormat: multi
        - name: page
          in: query
          required: false
          type: integer
          format: int32
        - name: perPage
          in: query
          required: false
          type: integer
          format: int32
        - name: larkUserId
          in: query
          required: false
          type: string
        - name: githubId
          in: query
          required: false
          type: string
      tags:
        - UserService
  /api/v1/core/user/users/{email}:
    get:
      operationId: UserService_GetUser
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetUserResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: email
          in: path
          required: true
          type: string
      tags:
        - UserService
  /api/v1/core/user/users/{email}/groups:unmap-all:
    post:
      operationId: UserService_UnmapUserFromAllGroups
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1UnmapUserFromAllGroupsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: email
          in: path
          required: true
          type: string
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/UserServiceUnmapUserFromAllGroupsBody'
      tags:
        - UserService
  /api/v1/core/user/users/{email}/leader:
    get:
      operationId: UserService_GetUserLeader
      responses:
        "200":
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetUserLeaderResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: email
          in: path
          required: true
          type: string
      tags:
        - UserService
  /api/v1/core/user/users:sync:
    post:
      operationId: UserService_SyncUsersAsync
      responses:
        "200":
          description: A successful response.
          schema:
            type: object
            properties: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/v1SyncUsersAsyncRequest'
      tags:
        - UserService
definitions:
  CalendarServiceUpdateCalendarConfigBody:
    type: object
    properties:
      timeZone:
        type: string
      fileHash:
        type: string
  IAMServiceUpdatePolicyBody:
    type: object
    properties:
      description:
        type: string
      permissions:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Permission'
      updatePermissions:
        type: boolean
  IAMServiceUpdateRoleBody:
    type: object
    properties:
      description:
        type: string
      allowedTenantIds:
        type: array
        items:
          type: string
          format: uint64
      updateAllowedTenantIds:
        type: boolean
  UserServiceMapUsersToGroupBody:
    type: object
    properties:
      emails:
        type: array
        items:
          type: string
  UserServiceUnmapUserFromAllGroupsBody:
    type: object
  UserServiceUnmapUsersFromGroupBody:
    type: object
    properties:
      emails:
        type: array
        items:
          type: string
  UserServiceUpdateGroupBody:
    type: object
    properties:
      parentName:
        type: string
      description:
        type: string
      tags:
        $ref: '#/definitions/v1ResourceTags'
  protobufAny:
    type: object
    properties:
      '@type':
        type: string
    additionalProperties: {}
  rpcStatus:
    type: object
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
      details:
        type: array
        items:
          type: object
          $ref: '#/definitions/protobufAny'
  v1APIKey:
    type: object
    properties:
      id:
        type: string
        format: uint64
      name:
        type: string
      comment:
        type: string
      owner:
        type: string
      createdAt:
        type: string
        format: int64
  v1APIToken:
    type: object
    properties:
      id:
        type: string
      name:
        type: string
      comment:
        type: string
      status:
        $ref: '#/definitions/v1APITokenStatus'
      owner:
        type: string
      createdAt:
        type: string
        format: int64
      expireAt:
        type: string
        format: int64
      privilege:
        $ref: '#/definitions/v1APITokenPrivilege'
  v1APITokenIPAccessList:
    type: object
    properties:
      userEmail:
        type: string
      createdAt:
        type: string
        format: int64
      updatedAt:
        type: string
        format: int64
      allowAll:
        type: boolean
      rules:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1APITokenIPRule'
  v1APITokenIPRule:
    type: object
    properties:
      cidr:
        type: string
      description:
        type: string
  v1APITokenPrivilege:
    type: string
    enum:
      - API_TOKEN_PRIVILEGE_UNSPECIFIED
      - API_TOKEN_PRIVILEGE_READWRITE
      - API_TOKEN_PRIVILEGE_READONLY
    default: API_TOKEN_PRIVILEGE_UNSPECIFIED
  v1APITokenStatus:
    type: string
    enum:
      - API_TOKEN_STATUS_UNSPECIFIED
      - API_TOKEN_STATUS_ACTIVE
      - API_TOKEN_STATUS_INACTIVE
    default: API_TOKEN_STATUS_UNSPECIFIED
  v1AuditLog:
    type: object
    properties:
      id:
        type: string
        format: uint64
      type:
        $ref: '#/definitions/v1AuditLogType'
      objectId:
        type: string
      operator:
        type: string
      operation:
        type: string
      operateAt:
        type: string
        format: int64
      details:
        type: string
        format: byte
  v1AuditLogType:
    type: string
    enum:
      - AUDIT_LOG_TYPE_UNSPECIFIED
      - AUDIT_LOG_TYPE_CHANGE
      - AUDIT_LOG_TYPE_CTL
      - AUDIT_LOG_TYPE_CLUSTER_MAINTENANCE
      - AUDIT_LOG_TYPE_OPERATION
      - AUDIT_LOG_TYPE_JUMP
      - AUDIT_LOG_TYPE_CLOUD_CONFIG_CHANGE
      - AUDIT_LOG_TYPE_CLOUD_CONFIG_DEFAULT_CONFIG_CHANGE
      - AUDIT_LOG_TYPE_K8S_UPGRADE_TASK
      - AUDIT_LOG_TYPE_TENANT
      - AUDIT_LOG_TYPE_SPU_SKU
      - AUDIT_LOG_TYPE_RBAC_ROLE
      - AUDIT_LOG_TYPE_RBAC_ROLE_BINDING
      - AUDIT_LOG_TYPE_IAM_ROLE
      - AUDIT_LOG_TYPE_IAM_ROLE_BINDING
      - AUDIT_LOG_TYPE_IAM_POLICY
      - AUDIT_LOG_TYPE_IAM_POLICY_BINDING
      - AUDIT_LOG_TYPE_IAM_API_KEY
      - AUDIT_LOG_TYPE_AGENT_PROJECT
    default: AUDIT_LOG_TYPE_UNSPECIFIED
  v1AuthenticateRequest:
    type: object
    properties:
      accessToken:
        type: string
      apiToken:
        type: string
      apiKey:
        type: string
  v1AuthenticateResponse:
    type: object
    properties:
      user:
        $ref: '#/definitions/v1User'
      apiToken:
        $ref: '#/definitions/v1APIToken'
        description: Set together with user when authenticating by API token.
      apiKey:
        $ref: '#/definitions/v1APIKey'
      principalProfile:
        $ref: '#/definitions/v1PrincipalProfile'
  v1AuthorizeRequest:
    type: object
    properties:
      userEmail:
        type: string
      apiKeyName:
        type: string
      apiTokenPrivilege:
        $ref: '#/definitions/v1APITokenPrivilege'
      uri:
        type: string
      method:
        type: string
  v1AuthorizeResponse:
    type: object
    properties:
      authorized:
        type: boolean
  v1BatchCreatePolicyBindingsRequest:
    type: object
    properties:
      policyNames:
        type: array
        items:
          type: string
      roleNames:
        type: array
        items:
          type: string
  v1BatchCreatePolicyBindingsResponse:
    type: object
    properties:
      policyBindings:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1PolicyBinding'
  v1BatchCreateRoleBindingsRequest:
    type: object
    properties:
      targets:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1RoleBindingTarget'
      roleNames:
        type: array
        items:
          type: string
  v1BatchCreateRoleBindingsResponse:
    type: object
    properties:
      roleBindings:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1RoleBinding'
  v1BatchDeletePolicyBindingsRequest:
    type: object
    properties:
      ids:
        type: array
        items:
          type: string
          format: uint64
  v1BatchDeletePolicyBindingsResponse:
    type: object
  v1BatchDeleteRoleBindingsRequest:
    type: object
    properties:
      ids:
        type: array
        items:
          type: string
          format: uint64
  v1BatchDeleteRoleBindingsResponse:
    type: object
  v1BatchGetResourceTagsRequest:
    type: object
    properties:
      resourceType:
        $ref: '#/definitions/v1ResourceType'
      resourceIds:
        type: array
        items:
          type: string
  v1BatchGetResourceTagsResponse:
    type: object
    properties:
      items:
        type: object
        additionalProperties:
          $ref: '#/definitions/v1ResourceTags'
  v1CalendarConfig:
    type: object
    properties:
      id:
        type: string
        format: uint64
      createdAt:
        type: string
        format: int64
      updatedAt:
        type: string
        format: int64
      name:
        type: string
      timeZone:
        type: string
      fileHash:
        type: string
  v1CalendarEvent:
    type: object
    properties:
      summary:
        type: string
      start:
        $ref: '#/definitions/v1CalendarEventTime'
      end:
        $ref: '#/definitions/v1CalendarEventTime'
      sourceCalendarName:
        type: string
      uid:
        type: string
  v1CalendarEventTime:
    type: object
    properties:
      date:
        type: string
        description: Local date for an all-day event. An end date is exclusive.
      dateTime:
        type: string
        format: date-time
        description: Absolute time for a timed event.
  v1CreateAuditLogRequest:
    type: object
    properties:
      auditLog:
        $ref: '#/definitions/v1AuditLog'
  v1CreateAuditLogResponse:
    type: object
    properties:
      id:
        type: string
        format: uint64
  v1CreateCalendarConfigRequest:
    type: object
    properties:
      name:
        type: string
      timeZone:
        type: string
      fileHash:
        type: string
  v1CreateCalendarConfigResponse:
    type: object
    properties:
      config:
        $ref: '#/definitions/v1CalendarConfig'
  v1CreateGroupRequest:
    type: object
    properties:
      name:
        type: string
      parentName:
        type: string
      description:
        type: string
      source:
        $ref: '#/definitions/v1UserGroupSource'
      tags:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Tag'
  v1CreateGroupResponse:
    type: object
  v1CreatePolicyRequest:
    type: object
    properties:
      name:
        type: string
      description:
        type: string
      permissions:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Permission'
      inlineRoleName:
        type: string
  v1CreatePolicyResponse:
    type: object
    properties:
      policy:
        $ref: '#/definitions/v1Policy'
  v1CreateRoleRequest:
    type: object
    properties:
      name:
        type: string
      description:
        type: string
      allowedTenantIds:
        type: array
        items:
          type: string
          format: uint64
  v1CreateRoleResponse:
    type: object
    properties:
      role:
        $ref: '#/definitions/v1Role'
  v1DeleteAPIKeyResponse:
    type: object
  v1DeleteAPITokenResponse:
    type: object
  v1DeleteCalendarConfigResponse:
    type: object
  v1DeleteGroupResponse:
    type: object
  v1DeletePolicyResponse:
    type: object
  v1DeleteRoleResponse:
    type: object
  v1GenerateAPIKeyRequest:
    type: object
    properties:
      name:
        type: string
      comment:
        type: string
      owner:
        type: string
  v1GenerateAPIKeyResponse:
    type: object
    properties:
      key:
        type: string
      apiKey:
        $ref: '#/definitions/v1APIKey'
  v1GenerateAPITokenRequest:
    type: object
    properties:
      name:
        type: string
      comment:
        type: string
      expireAt:
        type: string
        format: int64
      privilege:
        $ref: '#/definitions/v1APITokenPrivilege'
  v1GenerateAPITokenResponse:
    type: object
    properties:
      token:
        type: string
  v1GetAPIKeyResponse:
    type: object
    properties:
      apiKey:
        $ref: '#/definitions/v1APIKey'
  v1GetAPITokenIPAccessListResponse:
    type: object
    properties:
      accessList:
        $ref: '#/definitions/v1APITokenIPAccessList'
  v1GetAPITokenResponse:
    type: object
    properties:
      token:
        $ref: '#/definitions/v1APIToken'
  v1GetCalendarConfigResponse:
    type: object
    properties:
      config:
        $ref: '#/definitions/v1CalendarConfig'
  v1GetGroupResponse:
    type: object
    properties:
      group:
        $ref: '#/definitions/v1UserGroup'
  v1GetPolicyResponse:
    type: object
    properties:
      policy:
        $ref: '#/definitions/v1Policy'
  v1GetResourceTagsResponse:
    type: object
    properties:
      ref:
        $ref: '#/definitions/v1ResourceRef'
      tags:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Tag'
  v1GetRoleResponse:
    type: object
    properties:
      role:
        $ref: '#/definitions/v1Role'
      policies:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Policy'
  v1GetUserLeaderResponse:
    type: object
    properties:
      user:
        $ref: '#/definitions/v1User'
  v1GetUserResponse:
    type: object
    properties:
      user:
        $ref: '#/definitions/v1User'
  v1GrantSource:
    type: object
    properties:
      role:
        $ref: '#/definitions/v1Role'
      policy:
        $ref: '#/definitions/v1Policy'
      entity:
        $ref: '#/definitions/v1RoleBindingTarget'
  v1GrantedPermissions:
    type: object
    properties:
      permissions:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Permission'
      grantPath:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1GrantSource'
  v1HasCalendarEventResponse:
    type: object
    properties:
      hasEvent:
        type: boolean
      events:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1CalendarEvent'
  v1LarkType:
    type: string
    enum:
      - LARK_TYPE_UNSPECIFIED
      - LARK_TYPE_GLOBAL
    default: LARK_TYPE_UNSPECIFIED
  v1ListAPIKeysResponse:
    type: object
    properties:
      apiKeys:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1APIKey'
      total:
        type: string
        format: int64
  v1ListAPITokensResponse:
    type: object
    properties:
      tokens:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1APIToken'
      total:
        type: string
        format: int64
  v1ListAuditLogTypesResponse:
    type: object
    properties:
      types:
        type: array
        items:
          $ref: '#/definitions/v1AuditLogType'
  v1ListAuditLogsResponse:
    type: object
    properties:
      auditLogs:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1AuditLog'
      total:
        type: string
        format: int64
  v1ListCalendarConfigsResponse:
    type: object
    properties:
      configs:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1CalendarConfig'
      total:
        type: string
        format: int64
  v1ListCalendarEventsResponse:
    type: object
    properties:
      events:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1CalendarEvent'
  v1ListGroupsResponse:
    type: object
    properties:
      groups:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1UserGroup'
      total:
        type: string
        format: int64
  v1ListPoliciesResponse:
    type: object
    properties:
      policies:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Policy'
      total:
        type: string
        format: int64
  v1ListPolicyBindingsResponse:
    type: object
    properties:
      policyBindings:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1PolicyBinding'
      total:
        type: string
        format: int64
  v1ListRoleBindingsResponse:
    type: object
    properties:
      roleBindings:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1RoleBinding'
      total:
        type: string
        format: int64
  v1ListRolesResponse:
    type: object
    properties:
      roles:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Role'
      total:
        type: string
        format: int64
  v1ListUsersResponse:
    type: object
    properties:
      users:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1User'
      total:
        type: string
        format: int64
  v1MapUsersToGroupResponse:
    type: object
  v1Permission:
    type: object
    properties:
      id:
        type: string
        format: uint64
      resource:
        type: string
      operations:
        type: array
        items:
          type: string
      description:
        type: string
  v1Policy:
    type: object
    properties:
      id:
        type: string
        format: uint64
      createdAt:
        type: string
        format: int64
      updatedAt:
        type: string
        format: int64
      name:
        type: string
      type:
        $ref: '#/definitions/v1PolicyType'
      description:
        type: string
      permissions:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Permission'
  v1PolicyBinding:
    type: object
    properties:
      id:
        type: string
        format: uint64
      createdAt:
        type: string
        format: int64
      policyName:
        type: string
      roleName:
        type: string
  v1PolicyType:
    type: string
    enum:
      - POLICY_TYPE_UNSPECIFIED
      - POLICY_TYPE_CUSTOM
      - POLICY_TYPE_INLINE
    default: POLICY_TYPE_UNSPECIFIED
  v1PrincipalProfile:
    type: object
    properties:
      operatorType:
        type: string
      operatorName:
        type: string
      userEmail:
        type: string
      aggregatedRoleScope:
        $ref: '#/definitions/v1PrincipalRoleScope'
      roles:
        type: object
        additionalProperties:
          $ref: '#/definitions/v1PrincipalRoleScope'
  v1PrincipalRoleScope:
    type: object
    properties:
      allowGlobalRegion:
        type: boolean
      allowedRegions:
        type: array
        items:
          type: string
      allowedTenantIds:
        type: array
        items:
          type: string
          format: uint64
  v1ResolveEntityPermissionsRequest:
    type: object
    properties:
      target:
        $ref: '#/definitions/v1RoleBindingTarget'
  v1ResolveEntityPermissionsResponse:
    type: object
    properties:
      permissions:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1GrantedPermissions'
  v1ResolveRolePermissionsResponse:
    type: object
    properties:
      permissions:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1GrantedPermissions'
  v1ResourceRef:
    type: object
    properties:
      resourceType:
        $ref: '#/definitions/v1ResourceType'
      resourceId:
        type: string
  v1ResourceTags:
    type: object
    properties:
      tags:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Tag'
  v1ResourceType:
    type: string
    enum:
      - RESOURCE_TYPE_UNSPECIFIED
      - RESOURCE_TYPE_USER_USER_GROUP
    default: RESOURCE_TYPE_UNSPECIFIED
  v1Role:
    type: object
    properties:
      id:
        type: string
        format: uint64
      createdAt:
        type: string
        format: int64
      updatedAt:
        type: string
        format: int64
      name:
        type: string
      description:
        type: string
      allowedTenantIds:
        type: array
        items:
          type: string
          format: uint64
  v1RoleBinding:
    type: object
    properties:
      id:
        type: string
        format: uint64
      createdAt:
        type: string
        format: int64
      target:
        $ref: '#/definitions/v1RoleBindingTarget'
      roleName:
        type: string
  v1RoleBindingTarget:
    type: object
    properties:
      type:
        $ref: '#/definitions/v1RoleBindingTargetType'
      name:
        type: string
  v1RoleBindingTargetType:
    type: string
    enum:
      - ROLE_BINDING_TARGET_TYPE_UNSPECIFIED
      - ROLE_BINDING_TARGET_TYPE_USER
      - ROLE_BINDING_TARGET_TYPE_USER_GROUP
      - ROLE_BINDING_TARGET_TYPE_API_KEY
    default: ROLE_BINDING_TARGET_TYPE_UNSPECIFIED
  v1SearchResourcesRequest:
    type: object
    properties:
      resourceType:
        $ref: '#/definitions/v1ResourceType'
      tags:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Tag'
  v1SearchResourcesResponse:
    type: object
    properties:
      items:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1ResourceRef'
  v1SetResourceTagsRequest:
    type: object
    properties:
      ref:
        $ref: '#/definitions/v1ResourceRef'
      tags:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Tag'
  v1SetResourceTagsResponse:
    type: object
  v1SyncPolicyBindingsForRoleRequest:
    type: object
    properties:
      roleName:
        type: string
      policyNames:
        type: array
        items:
          type: string
  v1SyncPolicyBindingsForRoleResponse:
    type: object
    properties:
      created:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1PolicyBinding'
      deleted:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1PolicyBinding'
  v1SyncRoleBindingsForGroupRequest:
    type: object
  v1SyncRoleBindingsForGroupResponse:
    type: object
  v1SyncRoleBindingsForTargetRequest:
    type: object
    properties:
      target:
        $ref: '#/definitions/v1RoleBindingTarget'
      roleNames:
        type: array
        items:
          type: string
  v1SyncRoleBindingsForTargetResponse:
    type: object
    properties:
      created:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1RoleBinding'
      deleted:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1RoleBinding'
  v1SyncUserGroupsAsyncRequest:
    type: object
  v1SyncUsersAsyncRequest:
    type: object
  v1Tag:
    type: object
    properties:
      key:
        type: string
      value:
        type: string
  v1UnmapUserFromAllGroupsResponse:
    type: object
  v1UnmapUsersFromGroupResponse:
    type: object
  v1UpdateCalendarConfigResponse:
    type: object
    properties:
      config:
        $ref: '#/definitions/v1CalendarConfig'
  v1UpdateGroupResponse:
    type: object
  v1UpdatePolicyResponse:
    type: object
    properties:
      policy:
        $ref: '#/definitions/v1Policy'
  v1UpdateRoleResponse:
    type: object
    properties:
      role:
        $ref: '#/definitions/v1Role'
  v1UploadCalendarFileResponse:
    type: object
    properties:
      fileHash:
        type: string
  v1UpsertAPITokenIPAccessListRequest:
    type: object
    properties:
      allowAll:
        type: boolean
      rules:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1APITokenIPRule'
  v1UpsertAPITokenIPAccessListResponse:
    type: object
  v1User:
    type: object
    properties:
      email:
        type: string
      available:
        type: boolean
      deletedAt:
        type: string
        format: int64
      larkType:
        $ref: '#/definitions/v1LarkType'
      larkUserId:
        type: string
      larkUserOpenId:
        type: string
      larkUserName:
        type: string
      larkDepartmentId:
        type: string
      larkDepartmentName:
        type: string
      nameSearchText:
        type: string
      nameSearchAbbr:
        type: string
      githubId:
        type: string
      soc2Compliant:
        type: boolean
      larkUserEnName:
        type: string
      larkUserNickName:
        type: string
  v1UserGroup:
    type: object
    properties:
      base:
        $ref: '#/definitions/v1UserGroupBase'
      tags:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Tag'
  v1UserGroupBase:
    type: object
    properties:
      name:
        type: string
      parentName:
        type: string
      createdAt:
        type: string
        format: int64
      description:
        type: string
      source:
        $ref: '#/definitions/v1UserGroupSource'
  v1UserGroupSource:
    type: string
    enum:
      - USER_GROUP_SOURCE_UNSPECIFIED
      - USER_GROUP_SOURCE_CUSTOM
      - USER_GROUP_SOURCE_LARK
    default: USER_GROUP_SOURCE_UNSPECIFIED
  v1ValidateAPIKeyRequest:
    type: object
    properties:
      key:
        type: string
  v1ValidateAPIKeyResponse:
    type: object
    properties:
      apiKey:
        $ref: '#/definitions/v1APIKey'
