REST Resource: projects.locations.brands.evaluationContexts

资源:EvaluationContext

评估套件或用例的评估上下文。

JSON 表示法
{
  "name": string,
  "displayName": string,
  "description": string,
  "store": string,
  "menu": string,
  "testSessionStartTime": string,
  "mockClientExecutions": [
    {
      object (MockClientExecution)
    }
  ],
  "daypartId": string
}
字段
name

string

标识符。评估上下文的完整资源名称。格式:projects/{project}/locations/{location}/brands/{brand}/evaluationContexts/{evaluationContext}

displayName

string

必需。评估上下文的人类可读名称。

description

string

可选。评估上下文的说明。

store

string

必需。要用于评估用例的存储区的完整资源名称。格式:projects/{projectId}/locations/{location}/brands/{brandId}/stores/{storeId}

menu

string

可选。用于评估上下文的可选菜单。如果未提供,系统将使用商店的默认菜单。格式:projects/{projectId}/locations/{location}/brands/{brandId}/menus/{menuId}

testSessionStartTime

string (Timestamp format)

可选。订餐会话的可选注入开始时间。如果设置,评估会话将假定测试会话在此时间开始。这用于模拟一天中特定时间的订购行为。如果未设置,评估会话将使用当前时间作为开始时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

mockClientExecutions[]

object (MockClientExecution)

可选。在评估会话期间,针对订餐服务发送的客户端执行请求,可选择提供模拟的客户端执行响应。

daypartId

string

可选。用于评估上下文的可选时段 ID。如果提供了此 ID,代理在建立处理顺序配置时将使用此 ID。

MockClientExecution

表示模拟的客户端执行请求和响应对。如果订餐服务在评估运行中发送的请求与模拟请求匹配,则系统会将模拟响应返回给该服务。请注意,request.execution_id 在匹配期间会被忽略,因为它特定于会话。

JSON 表示法
{
  "rawJsonRequest": {
    object
  },
  "rawJsonResponse": {
    object
  }
}
字段
rawJsonRequest

object (Struct format)

可选。模拟客户端执行的请求。

rawJsonResponse

object (Struct format)

可选。模拟客户端执行的响应。

方法

create

创建 EvaluationContext。

delete

删除指定的 EvaluationContext。

get

获取 EvaluationContext。

list

列出 EvaluationContext。

patch

更新指定的 EvaluationContext。