|
| 1 | +# coding=utf8 |
| 2 | + |
| 3 | +# Copyright 2018 JDCLOUD.COM |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | +# NOTE: This class is auto generated by the jdcloud code generator program. |
| 18 | + |
| 19 | +from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest |
| 20 | + |
| 21 | + |
| 22 | +class HistogramsRequest(JDCloudRequest): |
| 23 | + """ |
| 24 | + 日志检索结果直方图 |
| 25 | + """ |
| 26 | + |
| 27 | + def __init__(self, parameters, header=None, version="v1"): |
| 28 | + super(HistogramsRequest, self).__init__( |
| 29 | + '/regions/{regionId}/logsets/{logsetUID}/logtopics/{logtopicUID}/histograms', 'GET', header, version) |
| 30 | + self.parameters = parameters |
| 31 | + |
| 32 | + |
| 33 | +class HistogramsParameters(object): |
| 34 | + |
| 35 | + def __init__(self, regionId,logsetUID,logtopicUID,action, ): |
| 36 | + """ |
| 37 | + :param regionId: 地域 Id |
| 38 | + :param logsetUID: 日志集ID |
| 39 | + :param logtopicUID: 日志主题ID |
| 40 | + :param action: "preview"表示预览, "fulltext"表示全文检索, "advance"表示按照搜索语句检索 |
| 41 | + """ |
| 42 | + |
| 43 | + self.regionId = regionId |
| 44 | + self.logsetUID = logsetUID |
| 45 | + self.logtopicUID = logtopicUID |
| 46 | + self.action = action |
| 47 | + self.expr = None |
| 48 | + self.caseSensitive = None |
| 49 | + self.startTime = None |
| 50 | + self.endTime = None |
| 51 | + |
| 52 | + def setExpr(self, expr): |
| 53 | + """ |
| 54 | + :param expr: (Optional) Base64编码的搜索表达式, |
| 55 | + """ |
| 56 | + self.expr = expr |
| 57 | + |
| 58 | + def setCaseSensitive(self, caseSensitive): |
| 59 | + """ |
| 60 | + :param caseSensitive: (Optional) 搜索关键字大小写敏感, 默认false |
| 61 | + """ |
| 62 | + self.caseSensitive = caseSensitive |
| 63 | + |
| 64 | + def setStartTime(self, startTime): |
| 65 | + """ |
| 66 | + :param startTime: (Optional) 开始时间。格式 “YYYY-MM-DDThh:mm:ssTZD”, 比如 “2018-11-09T15:34:46+0800”.当action != preview时,必填 |
| 67 | + """ |
| 68 | + self.startTime = startTime |
| 69 | + |
| 70 | + def setEndTime(self, endTime): |
| 71 | + """ |
| 72 | + :param endTime: (Optional) 结束时间。格式 “YYYY-MM-DDThh:mm:ssTZD”, 比如 “2018-11-09T15:34:46+0800”.当action != preview时,必填 |
| 73 | + """ |
| 74 | + self.endTime = endTime |
| 75 | + |
0 commit comments