openapi: 3.0.1
info:
  title: Site Service
  description: The Site Service is a utility API ontop of workspaces to facilitate site hierarchies.
  version: '2.0'
tags:
  - name: SiteService
security:
  - Authorization: []
paths:
  /users/site:
    get:
      summary: |-
        List sites by tenant.
         Permission Level: Read
      operationId: SiteService_ListSites
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListSitesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: genericFilter
          description: |-
            Generic filter for site fields (name, parent, displayName)
            If it contains a whitespace, it splits the text and filter by both words. Required: false
          in: query
          required: false
          schema:
            type: string
        - name: tenantId
          description: 'Tenant of the site. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: pageSize
          description: 'Items per page. Required: false'
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: pageToken
          description: 'Mongo DB Field, describes the encoded page token for page traversal, Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: sortField
          description: 'Sort field valid values: name, parent, displayName, lastUpdated. Default: name, Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: sortType
          description: 'Sort Type for the results, Default: ASC, Required: false'
          in: query
          required: false
          schema:
            type: string
            enum:
              - NONE
              - ASC
              - DESC
            default: NONE
        - name: includeUsers
          description: 'Whether to include list of users who belong to the site. Required : false'
          in: query
          required: false
          schema:
            type: boolean
        - name: domain
          description: 'Domain of the site (example: zpa, reflexis, wfc, etc), Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: scope
          description: 'Scope of the site , Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: specificFilter.displayName
          description: Only non blank
          in: query
          required: false
          schema:
            type: string
        - name: specificFilter.parentSpecificFilter.parent
          in: query
          required: false
          schema:
            type: string
        - name: specificFilter.hierarchyNodeSpecificFilter.isHierarchyNode
          in: query
          required: false
          schema:
            type: boolean
        - name: startsWithSingleCharacter
          description: 'Ability to search for a single starts with character, only applicable to specific_filter: display_name, Required: false, Default: false'
          in: query
          required: false
          schema:
            type: boolean
        - name: excludeTenantIds
          description: 'List of tenant IDs to exclude. Required: false'
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: statusInScope
          description: |-
            The enabled status of the site's scope in this request to search on, Default: enabled, Required: false

             - ENTITY_ENABLED: Entity is enabled
             - ENTITY_DISABLED: Entity is disabled
             - ENTITY_BOTH_ENABLED_DISABLED: Entity either enabled or disabled
          in: query
          required: false
          schema:
            type: string
            enum:
              - ENTITY_ENABLED
              - ENTITY_DISABLED
              - ENTITY_BOTH_ENABLED_DISABLED
            default: ENTITY_ENABLED
        - name: levelFilter.siteTier
          description: 'Site tier to filter by, Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: levelFilter.levelFilterType
          description: 'Enum to define the type of filtering, Required: false, Default: EQUALS'
          in: query
          required: false
          schema:
            type: string
            enum:
              - EQUALS
              - LESS_THAN
              - GREATER_THAN
              - NO_LEVEL
            default: EQUALS
      tags:
        - SiteService
    post:
      summary: Create a new site. (Which is represented with the low level data structure workspace)
      description: |-
        This is a convenience level above CreateWorkspace.

        Permission Level: Read-Write
      operationId: SiteService_CreateSite
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2CreateSiteResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2CreateSiteRequest'
        description: Mimics CreateWorkspaceRequest, but removes the fields `workspace_type` as that field can be populated through keywords/business logic.
        required: true
      tags:
        - SiteService
    put:
      summary: Update a site.
      description: 'Permission Level: Read-Write'
      operationId: SiteService_UpdateSite
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2UpdateSiteResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2UpdateSiteRequest'
        description: Mimics UpdateSiteRequest, but removes the fields `workspace_type` as that field can be populated through keywords/business logic.
        required: true
      tags:
        - SiteService
  /users/site/availableDepartments:
    get:
      summary: Get all of the available departments that can be added to a user given the site that is added to the user based on the sites site_template
      operationId: SiteService_ListAvailableDepartments
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListAvailableDepartmentsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: tenantId
          description: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
          in: query
          required: false
          schema:
            type: string
        - name: siteName
          description: 'Name of the site. Required: true'
          in: query
          required: false
          schema:
            type: string
      tags:
        - SiteService
  /users/site/availableRoles:
    get:
      summary: Get all of the available roles that can be added to a user given the site that is added to the user based on the sites site_template
      operationId: SiteService_ListAvailableRoles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListAvailableRolesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: tenantId
          description: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
          in: query
          required: false
          schema:
            type: string
        - name: siteName
          description: 'Name of the site. Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: pageSize
          description: 'Page size for the list of roles. Required: false, Default: 10'
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: pageToken
          description: 'Page token for the list of roles. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: sortField
          description: 'Sort field valid values: displayName. Default: displayName, Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: sortType
          description: 'Sort Type for the results, Default: ASC, Required: false'
          in: query
          required: false
          schema:
            type: string
            enum:
              - NONE
              - ASC
              - DESC
            default: NONE
      tags:
        - SiteService
  /users/site/hierarchy/{tenantId}:
    get:
      summary: |-
        Fetch the hierarchy for the tenant (nested structure format for visualization)
        Terminology for this endpoint: Hierarchy = Retail Operating Model Relationships between sites (parent/child), Node = A site that is a parent/has children
        Permission Level: Read
      operationId: SiteService_GetHierarchy
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2GetHierarchyResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: tenantId
          description: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
          in: path
          required: true
          schema:
            type: string
        - name: fieldMask
          in: query
          required: false
          schema:
            type: string
      tags:
        - SiteService
  /users/site/hierarchyFeatureFlag:
    get:
      summary: Returns whether the useHierarchyMetadata feature flag is enabled.
      operationId: SiteService_GetHierarchyFeatureFlag
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2GetHierarchyFeatureFlagResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      tags:
        - SiteService
  /users/site/hierarchyMetadata:
    get:
      summary: List hierarchy metadata
      description: 'Permission Level: Read'
      operationId: SiteService_ListHierarchyMetadata
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListHierarchyMetadataResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: tenantId
          description: 'TenantId of the hierarchy. Required: false (False as this can be inferred from the token)'
          in: query
          required: false
          schema:
            type: string
        - name: hierarchyId
          description: 'HierarchyIds of the hierarchies. Required: false'
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
      tags:
        - SiteService
    post:
      summary: Create a hierarchy metadata. (Which stores the information about a hierarchy)
      description: 'Permission Level: Read-Write'
      operationId: SiteService_CreateHierarchyMetadata
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2CreateHierarchyMetadataResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2CreateHierarchyMetadataRequest'
        required: true
      tags:
        - SiteService
  /users/site/hierarchyMetadata/{hierarchyId}:
    delete:
      summary: Delete a hierarchy metadata.
      description: 'Permission Level: Read-Write'
      operationId: SiteService_DeleteHierarchyMetadata
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: hierarchyId
          description: 'HierarchyId of the hierarchy. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          description: 'TenantId of the hierarchy. Required: false (False as this can be inferred from the token)'
          in: query
          required: false
          schema:
            type: string
      tags:
        - SiteService
    put:
      summary: Update a hierarchy metadata.
      description: 'Permission Level: Read-Write'
      operationId: SiteService_UpdateHierarchyMetadata
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2UpdateHierarchyMetadataResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: hierarchyId
          description: 'HierarchyId of the hierarchy, unique to the tenant. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiteServiceUpdateHierarchyMetadataBody'
        required: true
      tags:
        - SiteService
  /users/site/name/{name}:
    get:
      summary: Get a site by name.
      description: |-
        This is a convenience level above GetWorkspace.

        Permission Level: Read
      operationId: SiteService_GetSite
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2GetSiteResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: name
          description: Name of the site, Required = true
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          description: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
          in: query
          required: false
          schema:
            type: string
        - name: includeUsers
          description: 'Whether to include list of users who belong to the site. Required : false'
          in: query
          required: false
          schema:
            type: boolean
      tags:
        - SiteService
    delete:
      summary: Delete one site by name.
      description: |-
        This is an extension of DeleteWorkspace and DeleteThings.

        Permission Level: Read-Write
      operationId: SiteService_DeleteSite
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: name
          description: Name of the site, Required = true
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          description: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
          in: query
          required: false
          schema:
            type: string
      tags:
        - SiteService
  /users/site/relation:
    delete:
      summary: |-
        Delete Site-Department relationship.
        Permission Level: Read-Write
      operationId: SiteService_DeleteSiteDepartmentRelationship
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2DeleteSiteDepartmentRelationRequest'
        required: true
      tags:
        - SiteService
    post:
      summary: |-
        Bulk create Site-Department relationships.
        Permission Level: Read-Write
      operationId: SiteService_BulkCreateSiteDepartmentRelationships
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2BulkCreateSiteDepartmentRelationResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2BulkCreateSiteDepartmentRelationRequest'
        required: true
      tags:
        - SiteService
  /users/site/relation/types:
    delete:
      summary: |-
        Deletes site_types or site_tiers based on the type = SITE_TYPE or SITE_TIER.
        Permission Level: Read-Write
      operationId: SiteService_DeleteSiteTypesOrTiers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2DeleteSiteTypesOrTiersRequest'
        required: true
      tags:
        - SiteService
    post:
      summary: |-
        Creates site_types or site_tiers based on the type = SITE_TYPE or SITE_TIER.
        Permission Level: Read-Write
      operationId: SiteService_CreateSiteTypesOrTiers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2SiteTypesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2SiteTypesOrTiersRequest'
        required: true
      tags:
        - SiteService
  /users/site/relation/types/{relationType}:
    get:
      summary: |-
        Fetch site_types or site_tiers based on the type = SITE_TYPE or SITE_TIER.
        Permission Level: Read
      operationId: SiteService_GetSiteTypesOrTiers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2GetSiteTypesOrTiersResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: relationType
          description: 'Site Type. Required: true'
          in: path
          required: true
          schema:
            type: string
            enum:
              - SITE_TYPE
              - SITE_TIER
        - name: tenantId
          description: 'TenantId of the site type. Required: false (False as this can be inferred from the token)'
          in: query
          required: false
          schema:
            type: string
      tags:
        - SiteService
  /users/site/roles:
    get:
      summary: |-
        List roles for the given site
        Permission Level: Read
      operationId: SiteService_ListSiteRoles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListSiteRolesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: siteName
          description: 'Name of the site. Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: tenantId
          description: 'Tenant of the site. Required: false'
          in: query
          required: false
          schema:
            type: string
      tags:
        - SiteService
  /users/site/search:
    get:
      summary: |-
        Search sites by text string across name, displayname, description, domain, enabled_scopes and attributes. Returns 10 best results.
        Permission Level: Read
      operationId: SiteService_SearchSiteByTextSearch
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2SearchSiteByTextSearchResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: tenantId
          description: 'Tenant of the site, Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: siteText
          description: 'Text for the site to search on this fields: name, displayName, description, attributes(value, fieldName), domain. Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: scope
          description: 'Scope. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: pageSize
          description: 'Items per page. Required: false'
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: pageToken
          description: 'Mongo DB Field, describes the encoded page token for page traversal, Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: levelFilter.siteTier
          description: 'Site tier to filter by, Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: levelFilter.levelFilterType
          description: 'Enum to define the type of filtering, Required: false, Default: EQUALS'
          in: query
          required: false
          schema:
            type: string
            enum:
              - EQUALS
              - LESS_THAN
              - GREATER_THAN
              - NO_LEVEL
            default: EQUALS
        - name: displayName
          description: 'Text for the site to search on only this field: displayName. If used, site_text is ignored. Required: false'
          in: query
          required: false
          schema:
            type: string
      tags:
        - SiteService
  /users/site/validDepartments:
    get:
      summary: |-
        List valid departments for a given site
        Permission Level: Read
        Deprecated: Please Use SiteService.ListAvailableDepartments
      description: '[Deprecated: Please use the ListAvailableDepartments API.]'
      operationId: SiteService_ListValidDepartments
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListValidDepartmentsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: siteName
          description: 'Name of the site. Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: tenantId
          description: 'Tenant of the site. Required: false'
          in: query
          required: false
          schema:
            type: string
      tags:
        - SiteService
      deprecated: true
  /users/site/{siteName}/roles:
    delete:
      summary: |-
        Remove roles from a site.
        It is required a site and list of roles to be removed.
        Permission Level: Read-Write
      operationId: SiteService_DeleteSiteRoles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2SiteRoleResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: siteName
          description: 'Name of the site. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiteServiceDeleteSiteRolesBody'
        required: true
      tags:
        - SiteService
    post:
      summary: |-
        Add roles to a site.
        It is required a site and list of roles to be added.
        Permission Level: Read-Write
      operationId: SiteService_AddSiteRoles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2SiteRoleResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: siteName
          description: 'Name of the site. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiteServiceAddSiteRolesBody'
        required: true
      tags:
        - SiteService
  /users/site/{siteName}/users:
    post:
      summary: |-
        Add users to a site.
         Permission Level: Read-Write
      operationId: SiteService_AddSiteUsers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2SiteProto'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: siteName
          description: 'Name of the site. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiteServiceAddSiteUsersBody'
        required: true
      tags:
        - SiteService
servers:
  - url: https://prod-ui-zwseuprod01p.pp.zebra.com/api
    description: EU Server
  - url: https://prod-ui-zwsusprod01p.pp.zebra.com/api
    description: NA Server
components:
  schemas:
    SiteServiceAddSiteRolesBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the site. Required: false'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueRoleProto'
          title: 'List of roles to be added/removed from the site, Required: true'
    SiteServiceAddSiteUsersBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the site. Required: false'
        users:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueUserProto'
          title: 'list of users (user_ids) to add to the site, Required: true'
    SiteServiceDeleteSiteRolesBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the site. Required: false'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueRoleProto'
          title: 'List of roles to be added/removed from the site, Required: true'
    SiteServiceUpdateHierarchyMetadataBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'TenantId of the hierarchy. Required: false (False as this can be inferred from the token)'
        displayName:
          type: string
          title: 'Display name of the hierarchy. Required: false'
        description:
          type: string
          title: 'Description of the hierarchy. Required: false'
        updateHierarchyMetadataActiveToggle:
          $ref: '#/components/schemas/v2UpdateHierarchyMetadataActiveToggle'
        updateLevels:
          type: array
          items:
            $ref: '#/components/schemas/v2CreateLevelProto'
          title: 'Hierarchy Levels for update, Must define all levels as this does a full replace. Required: false'
        updateFieldMask:
          type: string
          title: |-
            FieldMask to control what fields are to be updated. Required: false
            Valid path names (display_name, description, update_levels, active) as related to HierarchyMetadataProto
    commonsSortType:
      type: string
      enum:
        - NONE
        - ASC
        - DESC
      default: NONE
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    typeDate:
      type: object
      properties:
        year:
          type: integer
          format: int32
          description: |-
            Year of the date. Must be from 1 to 9999, or 0 to specify a date without
            a year.
        month:
          type: integer
          format: int32
          description: |-
            Month of a year. Must be from 1 to 12, or 0 to specify a year without a
            month and day.
        day:
          type: integer
          format: int32
          description: |-
            Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
            to specify a year by itself or a year and month where the day isn't
            significant.
      description: |-
        * A full date, with non-zero year, month, and day values
        * A month and day value, with a zero year, such as an anniversary
        * A year on its own, with zero month and day values
        * A year and month value, with a zero day, such as a credit card expiration
        date

        Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
        `google.protobuf.Timestamp`.
      title: |-
        Represents a whole or partial calendar date, such as a birthday. The time of
        day and time zone are either specified elsewhere or are insignificant. The
        date is relative to the Gregorian Calendar. This can represent one of the
        following:
    v2BulkCreateSiteDepartmentRelationRequest:
      type: object
      properties:
        tenantId:
          type: string
          description: Populates propertyCharacteristicsAndValues.tenantId
          title: 'TenantId of the relationship. Required: false (False as this can be inferred from the token)'
        siteDepartmentRelations:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteDepartmentRelationProto'
          title: 'List of Site-Department relationships.  Required: true'
    v2BulkCreateSiteDepartmentRelationResponse:
      type: object
      properties:
        created:
          type: integer
          format: int32
          title: Number of relationships created
        updated:
          type: integer
          format: int32
          title: Number of relationships updated
        errors:
          type: array
          items:
            $ref: '#/components/schemas/v2ErrorAndMessage'
          title: Errors
    v2CreateHierarchyMetadataRequest:
      type: object
      properties:
        tenantId:
          type: string
          title: 'TenantId of the hierarchy. Required: false (False as this can be inferred from the token)'
        hierarchyId:
          type: string
          title: 'HierarchyId of the hierarchy, unique to the tenant. Required: true'
        displayName:
          type: string
          title: 'Display name of the hierarchy. Required: false'
        description:
          type: string
          title: 'Description of the hierarchy. Required: false'
        active:
          type: boolean
          title: 'Active status of hierarchy. Required: false, default false'
        levels:
          type: array
          items:
            $ref: '#/components/schemas/v2CreateLevelProto'
          title: 'Levels of hierarchy. Required: false'
    v2CreateHierarchyMetadataResponse:
      type: object
      properties:
        hierarchyMetadata:
          $ref: '#/components/schemas/v2HierarchyMetadataProto'
    v2CreateLevelProto:
      type: object
      properties:
        levelName:
          type: string
          title: 'Name of the level. Required: true'
        displayName:
          type: string
          title: 'Display name of the level. Required: false'
        order:
          type: integer
          format: int32
          title: 'Order of the level in the hierarchy, all levels must start at 0 and be sequential (ie. 1, 2, 3). Required: true'
    v2CreateSiteRequest:
      type: object
      properties:
        name:
          type: string
          title: Name of the site, Required = true
        tenantId:
          type: string
          title: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
        parent:
          type: string
          title: Name of the parent of the site, Required = false
        displayName:
          type: string
          title: Friendly display name, Required = false
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteAttributeProto'
          title: Site specific attributes, Required = false
        domain:
          type: string
          title: 'Domain of the site (example: zpa, reflexis, wfc, etc), Required: false'
        scope:
          type: string
          title: 'Scope of the site , Required: false'
        description:
          type: string
          title: 'Workspace free form description, Required: false'
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: 'Scopes and expiration dates, Required: false'
        siteType:
          type: string
          title: 'The site_type that the site possesses, Required: false'
        siteTier:
          type: string
          title: 'The site_tier that the site possesses, Required: false'
        isHierarchyNode:
          type: boolean
          title: |-
            True if is a Retail Operating Model "Hierarchy Node", false if it is a Retail Operating Model "Site".
            Defaults to a Retail Operating Model "Site" if not included, Required: false
        isSyncBridge:
          type: boolean
          title: 'Flag for sync bridge use ONLY, Required: false (DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING)'
      description: Mimics CreateWorkspaceRequest, but removes the fields `workspace_type` as that field can be populated through keywords/business logic.
    v2CreateSiteResponse:
      type: object
      properties:
        name:
          type: string
          title: Name of the site, Required = true
        tenantId:
          type: string
          title: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
        parent:
          type: string
          title: |-
            Name of the parent of the site, Required = false
            Parent MUST have an associated Site Tier, the created site MUST also have an associated site tier if specifying a parent.
            Parent MUST be on a higher tier
        displayName:
          type: string
          title: Friendly display name, Required = false
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteAttributeProto'
          title: Site specific attributes, Required = false
        domain:
          type: string
          title: 'Domain of the site (example: zpa, reflexis, wfc, etc), Required: false'
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scopes and status (enable, disable) for a scope. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes, Default: empty'
        description:
          type: string
          title: 'site free form description, Required: false'
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: 'Scopes and expiration dates, Required: false'
        siteType:
          type: string
          title: 'The site_type that the site possesses, Required: false'
        siteTier:
          type: string
          title: 'The site_tier that the site possesses, Required: false'
        isHierarchyNode:
          type: boolean
          title: |-
            True if is a Retail Operating Model "Hierarchy Node", false if it is a Retail Operating Model "Site".
            Defaults to a Retail Operating Model "Site" if not included, Required: false
    v2DeleteSiteDepartmentRelationRequest:
      type: object
      properties:
        tenantId:
          type: string
          title: 'TenantId of the relationship. Required: false (False as this can be inferred from the token)'
        relationshipName:
          type: string
          title: |-
            Relationship Name. Required: true
            Populates Part 1 of Property Name [It can have underscores, but no spaces for now and in CAPS will be preferred, as it is a SYSTEM_ATTRIBUTE for the system]
        siteDepartmentRelationType:
          $ref: '#/components/schemas/v2SiteDepartmentRelationType'
        departments:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueDepartmentProto'
          title: 'List of related already existing departments. Required: true'
    v2DeleteSiteTypesOrTiersRequest:
      type: object
      properties:
        tenantId:
          type: string
          title: 'TenantId of the site type. Required: false (False as this can be inferred from the token)'
        relationType:
          $ref: '#/components/schemas/v2SiteDepartmentRelationType'
        values:
          type: array
          items:
            type: string
          title: |-
            Value of the site types or tiers to be deleted. Required: true
            Only inactive hierarchies can have a single tier deleted (Only the bottom most tier)
            The deletion of a site tier will cause all of the sites with the given tier to lose their parent
            Note that GetHierarchy will then possibly return multiple root nodes at different tiers due to parents losing their tiers
            This will not cascade remove parents from all child sites under the sites with the deleted tier
    v2DisplayableDepartment:
      type: object
      properties:
        tenantId:
          type: string
        name:
          type: string
        displayName:
          type: string
    v2DisplayableRole:
      type: object
      properties:
        tenantId:
          type: string
        roleId:
          type: string
        displayName:
          type: string
        domain:
          type: string
        scope:
          type: string
    v2EnabledStatusInScope:
      type: string
      enum:
        - ENTITY_ENABLED
        - ENTITY_DISABLED
        - ENTITY_BOTH_ENABLED_DISABLED
      default: ENTITY_ENABLED
      description: |-
        - ENTITY_ENABLED: Entity is enabled
         - ENTITY_DISABLED: Entity is disabled
         - ENTITY_BOTH_ENABLED_DISABLED: Entity either enabled or disabled
      title: This enum represents the search of Enabled/Disabled/Both for a entity's scope
    v2ErrorAndMessage:
      type: object
      properties:
        name:
          type: string
          title: Name of the relationship
        message:
          type: string
          title: Message describing the error
    v2GetHierarchyFeatureFlagResponse:
      type: object
      properties:
        useHierarchyMetadata:
          type: boolean
          description: |-
            True if the deployment is using HierarchyMetadata for hierarchy management.
            False if the legacy Property Service approach is in use.
    v2GetHierarchyResponse:
      type: object
      properties:
        hierarchyNode:
          type: array
          items:
            $ref: '#/components/schemas/v2HierarchyNode'
          title: |-
            The roots of the hierarchies
            There should only be one hierarchy, but this is repeated just in case to display others in this same tenant
    v2GetSiteResponse:
      type: object
      properties:
        name:
          type: string
          title: Name of the site (Mapped from workspace)
        parent:
          type: string
          title: Name of the parent of the site (Mapped from workspace)
        ancestors:
          type: array
          items:
            type: string
          title: Ancestor list of the site (Mapped from workspace)
        descendants:
          type: array
          items:
            type: string
          title: Flattened list of descendants of the site (Mapped from workspace)
        displayName:
          type: string
          title: Friendly display name of the site (Mapped from workspace)
        creationTime:
          type: string
          format: date-time
          title: site creation time
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteAttributeProto'
          title: Attributes of the site
        users:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueUserProto'
          title: List of users who belong to the site
        domain:
          type: string
          title: 'Domain of the site (example: zpa, reflexis, wfc, etc), Required: false'
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scopes and status (enable, disable) for a site Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes, Default: empty'
        description:
          type: string
          title: Site free form description
        siteType:
          type: string
          title: The site_type that the site possesses
        siteTier:
          type: string
          title: The site_tier that the site possesses
        isHierarchyNode:
          type: boolean
          description: |-
            True if is a Retail Operating Model "Hierarchy Node", false if it is a Retail Operating Model "Site".
            Defaults to a Retail Operating Model "Site" if not included.
        siteTypeDisplayName:
          type: string
          title: The display name of the site type, if any
        siteTierDisplayName:
          type: string
          title: The display name of the site tier, if any
        siteTemplateFriendlyName:
          type: string
          title: Site template friendly name of the site if it exists
      title: This encapsulates a workspace
    v2GetSiteTypesOrTiersResponse:
      type: object
      properties:
        tenantId:
          type: string
          description: TenantId of the  type.
        values:
          type: array
          items:
            $ref: '#/components/schemas/v2RelationProto'
          title: 'The values of site_types or site_tiers. Required: true'
    v2HierarchyMetadataProto:
      type: object
      properties:
        tenantId:
          type: string
          description: TenantId of the hierarchy.
        hierarchyId:
          type: string
          description: HierarchyId of the hierarchy.
        displayName:
          type: string
          description: Display name of the hierarchy.
        description:
          type: string
          description: Description of the hierarchy.
        active:
          type: boolean
          description: Active status of hierarchy.
        levels:
          type: array
          items:
            $ref: '#/components/schemas/v2LevelProto'
          description: Levels of hierarchy.
        creationTime:
          type: string
          format: date-time
          title: Time of creation
        lastUpdated:
          type: string
          format: date-time
          title: Time of most recent update
    v2HierarchyNode:
      type: object
      properties:
        tenant:
          type: string
          title: Tenant of the site node
        name:
          type: string
          title: Name of the site node
        displayName:
          type: string
          title: Display name of the site node
        siteType:
          type: string
          title: Site type of the site node
        siteTier:
          type: string
          title: Site tier of the site node
        children:
          type: array
          items:
            $ref: '#/components/schemas/v2HierarchyNode'
          title: Children of the site node (which can also have children)
        isHierarchyNode:
          type: boolean
          description: |-
            True if is a Retail Operating Model "Hierarchy Node", false if it is a Retail Operating Model "Site".
            Defaults to a Retail Operating Model "Site" if not included.
        siteChildrenCount:
          type: integer
          format: int32
          title: Number of site children directly related to this hierarchy node
        description:
          type: string
          title: Description of the site
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteAttributeProto'
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scopes and status (enable, disable) for a scope. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes, Default: empty'
        creationTime:
          type: string
          format: date-time
          title: Timestamp when it was created
        siteTemplateFriendlyName:
          type: string
          title: Site template friendly name of the site node if it exists
    v2HierarchyNodeSpecificFilter:
      type: object
      properties:
        isHierarchyNode:
          type: boolean
      title: Controls Retail Operating Model "Hierarchy Node" specific filter null or empty or value
    v2LevelFilterType:
      type: string
      enum:
        - EQUALS
        - LESS_THAN
        - GREATER_THAN
        - NO_LEVEL
      default: EQUALS
    v2LevelProto:
      type: object
      properties:
        levelName:
          type: string
          title: Name of the level
        displayName:
          type: string
          title: Display name of the level
        order:
          type: integer
          format: int32
          title: Order of the level in the hierarchy
        creationTime:
          type: string
          format: date-time
          title: Time of creation of HierarchyMetadata entity
        lastUpdated:
          type: string
          format: date-time
          title: Time of most recent update
    v2ListAvailableDepartmentsResponse:
      type: object
      properties:
        availableDepartments:
          type: array
          items:
            $ref: '#/components/schemas/v2DisplayableDepartment'
          title: List of available departments
    v2ListAvailableRolesResponse:
      type: object
      properties:
        availableRoles:
          type: array
          items:
            $ref: '#/components/schemas/v2DisplayableRole'
          title: List of available roles
        nextPageToken:
          type: string
          title: Next page token
    v2ListHierarchyMetadataResponse:
      type: object
      properties:
        hierarchyMetadata:
          type: array
          items:
            $ref: '#/components/schemas/v2HierarchyMetadataProto'
    v2ListSiteRolesResponse:
      type: object
      properties:
        roles:
          type: array
          items:
            $ref: '#/components/schemas/v2MinimalRoleResponse'
        inheritedRoles:
          type: array
          items:
            $ref: '#/components/schemas/v2MinimalRoleResponse'
    v2ListSitesResponse:
      type: object
      properties:
        sites:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteProto'
          title: List of sites found
        nextPageToken:
          type: string
          title: Next page token
    v2ListValidDepartmentsResponse:
      type: object
      properties:
        siteTierDepartments:
          type: array
          items:
            $ref: '#/components/schemas/v2SimpleDepartmentProto'
        siteTypeDepartments:
          type: array
          items:
            $ref: '#/components/schemas/v2SimpleDepartmentProto'
    v2MinimalRoleResponse:
      type: object
      properties:
        tenantId:
          type: string
          title: The id of the tenant
        domain:
          type: string
          title: 'The platform domain (example: zpa, reflexis, wfc)'
        scope:
          type: string
          description: Some more general scoping for the data (like a particular app in the domain).
        roleId:
          type: string
          title: Role id
        description:
          type: string
          description: Role description.
      title: The role data model, fewer fields
    v2ParentSpecificFilter:
      type: object
      properties:
        parent:
          type: string
      title: Controls parent specific filter null or empty or value
    v2RelationProto:
      type: object
      properties:
        name:
          type: string
          title: 'Name of the relation. Required: true'
        friendlyName:
          type: string
          title: 'Friendly name of the relation.  Required: false'
        description:
          type: string
          title: 'Description of the relation. Required: false'
        enabled:
          type: boolean
          title: 'Whether the relation is active or not. Default: false, Required: false'
    v2SearchSiteByTextSearchResponse:
      type: object
      properties:
        sites:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceProtoForTextSearchResponse'
          title: List of sites found
        nextPageToken:
          type: string
          title: Next page token
    v2SimpleDepartmentProto:
      type: object
      properties:
        tenantId:
          type: string
        departmentName:
          type: string
      description: |-
        Protobuf created to represent a Department.
        Using this name because UniqueDepartmentProto is already used for another use case.
    v2SiteAttributeProto:
      type: object
      properties:
        scope:
          type: string
          title: 'General scoping for site attribute. Required: false'
        fieldName:
          type: string
          title: 'Name of the attribute. Required: true'
        value:
          type: string
          title: 'Value of the attribute. Required: false'
        domain:
          type: string
          title: 'Domain of the attribute. Required : false'
      title: Mimics the attributes that are contained within Workspaces
    v2SiteDepartmentRelationProto:
      type: object
      properties:
        relationshipName:
          type: string
          description: Populates Part 1 of Property Name [It can have underscores, but no spaces for now and in CAPS will be preferred, as it is a SYSTEM_ATTRIBUTE for the system]
          title: 'Relationship Name. Required: true'
        siteDepartmentRelationType:
          $ref: '#/components/schemas/v2SiteDepartmentRelationType'
        departments:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueDepartmentProto'
          title: 'List of related already existing departments. Required: false'
        sites:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueSiteProto'
          title: 'List of related already existing sites. Required: false'
    v2SiteDepartmentRelationType:
      type: string
      enum:
        - SITE_TYPE
        - SITE_TIER
      default: SITE_TYPE
      description: Enum with all possible values for the Site-Department relation type.
    v2SiteLevelFilter:
      type: object
      properties:
        siteTier:
          type: string
          title: 'Site tier to filter by, Required: true'
        levelFilterType:
          $ref: '#/components/schemas/v2LevelFilterType'
    v2SiteProto:
      type: object
      properties:
        name:
          type: string
          title: Name of the site (Mapped from workspace)
        parent:
          type: string
          title: Name of the parent of the site (Mapped from workspace)
        tenantId:
          type: string
          title: Tenant of the site
        ancestors:
          type: array
          items:
            type: string
          title: Ancestor list of the site (Mapped from workspace)
        descendants:
          type: array
          items:
            type: string
          title: Flattened list of descendants of the site (Mapped from workspace)
        displayName:
          type: string
          title: Friendly display name of the site (Mapped from workspace)
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteAttributeProto'
          title: Attributes of the site
        users:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueUserProto'
          title: List of users who belong to the site
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scopes and status (enable, disable) for a site Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes, Default: empty'
        creationTime:
          type: string
          format: date-time
          title: Time of creation of site entity
        domain:
          type: string
          title: Site domain
        lastUpdated:
          type: string
          format: date-time
          title: Time of most recent update to the site entity
        description:
          type: string
          title: Site free form description
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: Scopes and expiration dates
        siteType:
          type: string
          title: The site_type that the site possesses
        siteTier:
          type: string
          title: The site_tier that the site possesses
        isHierarchyNode:
          type: boolean
          description: |-
            True if is a Retail Operating Model "Hierarchy Node", false if it is a Retail Operating Model "Site".
            Defaults to a Retail Operating Model "Site" if not included.
    v2SiteRoleProto:
      type: object
      properties:
        name:
          type: string
          title: Name of the site (Mapped from workspace)
        parent:
          type: string
          title: Name of the parent of the site (Mapped from workspace)
        tenantId:
          type: string
          title: Tenant of the site
        ancestors:
          type: array
          items:
            type: string
          title: Ancestor list of the site (Mapped from workspace)
        descendants:
          type: array
          items:
            type: string
          title: Flattened list of descendants of the site (Mapped from workspace)
        displayName:
          type: string
          title: Friendly display name of the site (Mapped from workspace)
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteAttributeProto'
          title: Attributes of the site
        roles:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueRoleProto'
          title: List of roles which belong to the site
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scopes and status (enable, disable) for a site Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes, Default: empty'
        creationTime:
          type: string
          format: date-time
          title: Time of creation of site entity
        domain:
          type: string
          title: Site domain
        lastUpdated:
          type: string
          format: date-time
          title: Time of most recent update to the site entity
        description:
          type: string
          title: Site free form description
        siteType:
          type: string
          title: 'The site_type that the site possesses, Required: false'
        siteTier:
          type: string
          title: 'The site_type that the site possesses, Required: false'
        isHierarchyNode:
          type: boolean
          description: |-
            True if is a Retail Operating Model "Hierarchy Node", false if it is a Retail Operating Model "Site".
            Defaults to a Retail Operating Model "Site" if not included.
    v2SiteRoleResponse:
      type: object
      properties:
        site:
          $ref: '#/components/schemas/v2SiteRoleProto'
    v2SiteTypesOrTiersRequest:
      type: object
      properties:
        tenantId:
          type: string
          title: 'TenantId of the site type. Required: false (False as this can be inferred from the token)'
        relationType:
          $ref: '#/components/schemas/v2SiteDepartmentRelationType'
        values:
          type: array
          items:
            $ref: '#/components/schemas/v2RelationProto'
          title: 'Value of the site types or tiers. Required: true'
    v2SiteTypesResponse:
      type: object
      properties:
        tenantId:
          type: string
          title: Tenant ID of the site type or site_tier
        siteTypes:
          type: array
          items:
            $ref: '#/components/schemas/v2RelationProto'
          title: List of site types
        siteTiers:
          type: array
          items:
            $ref: '#/components/schemas/v2RelationProto'
          title: List of site tiers
    v2UniqueDepartmentProto:
      type: object
      properties:
        tenantId:
          type: string
          description: Used to lookup the department for validation
          title: 'TenantId of the Department. Required: false'
        departmentName:
          type: string
          description: Populates propertyNameStatusValues.propertyNameStatusValues.name
          title: 'Name of the Department. Required: true'
        departmentFriendlyName:
          type: string
          description: Populates propertyNameStatusValues.propertyNameStatusValues.friendlyName
          title: 'Friendly name of the Department. Required: true'
    v2UniqueRoleProto:
      type: object
      properties:
        tenantId:
          type: string
          description: 'The ID of the tenant. Required: false. Defaults to the tenant of the user making the call.'
        domain:
          type: string
          description: |-
            The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)
            Defaults to the domain in the request.
        scope:
          type: string
          description: 'Some more general scoping for the data (like a particular app in the domain). Required: false.'
        roleId:
          type: string
          description: 'The role ID. Required: true.'
        userIds:
          type: array
          items:
            type: string
          title: 'The User Ids for the Unique Role Proto, Required: false'
    v2UniqueSiteProto:
      type: object
      properties:
        tenantId:
          type: string
          title: 'TenantId of the Site. Required: false'
        siteName:
          type: string
          title: 'Name of the Site. Required: true'
    v2UniqueUserProto:
      type: object
      properties:
        tenantId:
          type: string
          description: 'The ID of the tenant. Required: false. Defaults to the tenant of the user making the call.'
        userId:
          type: string
          description: 'The user ID. Required: true.'
        firstName:
          type: string
          description: 'The first name. Required: false.'
        lastName:
          type: string
          description: 'The last name. Required: false.'
    v2UpdateHierarchyMetadataActiveToggle:
      type: object
      properties:
        active:
          type: boolean
    v2UpdateHierarchyMetadataResponse:
      type: object
      properties:
        hierarchyMetadata:
          $ref: '#/components/schemas/v2HierarchyMetadataProto'
    v2UpdateSiteRequest:
      type: object
      properties:
        name:
          type: string
          title: Name of the site, Required = true
        tenantId:
          type: string
          title: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
        parent:
          type: string
          title: |-
            Name of the parent of the site, Required = false
            Parent MUST have an associated Site Tier, the updated site MUST also have an associated site tier if specifying a parent
            Parent MUST be on a higher tier
        displayName:
          type: string
          title: Friendly display name, Required = false
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteAttributeProto'
          title: Site specific attributes, Required = false
        domain:
          type: string
          title: 'Domain of the site (example: zpa, reflexis, wfc, etc), Required: false'
        updateFieldMask:
          type: string
          title: |-
            FieldMask to control what fields are to be updated, Required: false
            Valid path names (display_name, parent, attributes, scopes, description, site_type, site_tier) as related to WorkspaceProto
            If the site_tier is removed through attributes or site_tier path, the parent will also be removed from the site
            This will not cascade remove parents from all child sites under the site with the deleted tier
        updateScopeOption:
          $ref: '#/components/schemas/v2UpdateWorkspaceScope'
        description:
          type: string
          title: 'Updated site description, Required: false'
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: 'Scopes and expiration dates, Required: false'
        siteType:
          type: string
          title: 'The site_type that the site possesses, Required: false'
        siteTier:
          type: string
          title: 'The site_tier that the site possesses, Required: false'
        isSyncBridge:
          type: boolean
          title: 'Flag for sync bridge use ONLY, Required: false (DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING)'
      description: Mimics UpdateSiteRequest, but removes the fields `workspace_type` as that field can be populated through keywords/business logic.
    v2UpdateSiteResponse:
      type: object
      properties:
        name:
          type: string
          title: Name of the site, Required = true
        tenantId:
          type: string
          title: 'TenantId of the site. Required: false (False as this can be inferred from the token)'
        parent:
          type: string
          title: Name of the parent of the site, Required = false
        displayName:
          type: string
          title: Friendly display name, Required = false
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2SiteAttributeProto'
          title: Site specific attributes, Required = false
        domain:
          type: string
          title: 'Domain of the site (example: zpa, reflexis, wfc, etc), Required: false'
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scopes and status (enable, disable) for a scope. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes, Default: empty'
        description:
          type: string
          title: 'site free form description, Required: false'
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: 'Scopes and expiration dates, Required: false'
        siteType:
          type: string
          title: The site_type that the site possesses
        siteTier:
          type: string
          title: The site_tier that the site possesses
        isHierarchyNode:
          type: boolean
          description: |-
            True if is a Retail Operating Model "Hierarchy Node", false if it is a Retail Operating Model "Site".
            Defaults to a Retail Operating Model "Site" if not included.
    v2UpdateWorkspaceScope:
      type: object
      properties:
        scopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scope names and enabled status, Required: false'
        autoRemoveUsers:
          type: boolean
          title: 'Option to remove the workspace from related users upon disabling, Required: false, Default: false'
    v2WorkspaceAttributeProto:
      type: object
      properties:
        scope:
          type: string
          title: 'General scoping for workspace attribute. Required: false'
        fieldName:
          type: string
          title: 'Name of the attribute. Required: true'
        value:
          type: string
          title: 'Value of the attribute. Required: false'
        domain:
          type: string
          title: 'Domain of the attribute. Required : false'
    v2WorkspaceProtoForTextSearchResponse:
      type: object
      properties:
        name:
          type: string
          title: Name of the workspace
        displayName:
          type: string
          title: Friendly display name
        description:
          type: string
          title: Workspace free form description
        tenantId:
          type: string
          title: Tenant of the workspace
        domain:
          type: string
          title: Domain
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceAttributeProto'
          title: Workspace specific attributes
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: Scopes and status (enable, disable)
    v2WorkspaceSpecificFilter:
      type: object
      properties:
        displayName:
          type: string
          title: Only non blank
        parentSpecificFilter:
          $ref: '#/components/schemas/v2ParentSpecificFilter'
        hierarchyNodeSpecificFilter:
          $ref: '#/components/schemas/v2HierarchyNodeSpecificFilter'
      title: 'This will create and AND criteria on the specific fields for any of the values. Required: false'
    googleRpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
  securitySchemes:
    Authorization:
      type: apiKey
      description: Bearer token
      name: Authorization
      in: header
