@wppconnect/wa-proto 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/WAProto.proto +95 -1
- package/dist/index.d.ts +1149 -0
- package/dist/index.js +3192 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1745,6 +1745,3112 @@ $root.waproto = (function() {
|
|
|
1745
1745
|
return ADVSignedKeyIndexList;
|
|
1746
1746
|
})();
|
|
1747
1747
|
|
|
1748
|
+
waproto.AIRichResponseMessage = (function() {
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* Properties of a AIRichResponseMessage.
|
|
1752
|
+
* @memberof waproto
|
|
1753
|
+
* @interface IAIRichResponseMessage
|
|
1754
|
+
* @property {waproto.AIRichResponseMessage.AIRichResponseMessageType|null} [messageType] AIRichResponseMessage messageType
|
|
1755
|
+
* @property {Array.<waproto.AIRichResponseMessage.IAIRichResponseSubMessage>|null} [submessages] AIRichResponseMessage submessages
|
|
1756
|
+
*/
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* Constructs a new AIRichResponseMessage.
|
|
1760
|
+
* @memberof waproto
|
|
1761
|
+
* @classdesc Represents a AIRichResponseMessage.
|
|
1762
|
+
* @implements IAIRichResponseMessage
|
|
1763
|
+
* @constructor
|
|
1764
|
+
* @param {waproto.IAIRichResponseMessage=} [properties] Properties to set
|
|
1765
|
+
*/
|
|
1766
|
+
function AIRichResponseMessage(properties) {
|
|
1767
|
+
this.submessages = [];
|
|
1768
|
+
if (properties)
|
|
1769
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1770
|
+
if (properties[keys[i]] != null)
|
|
1771
|
+
this[keys[i]] = properties[keys[i]];
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* AIRichResponseMessage messageType.
|
|
1776
|
+
* @member {waproto.AIRichResponseMessage.AIRichResponseMessageType|null|undefined} messageType
|
|
1777
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1778
|
+
* @instance
|
|
1779
|
+
*/
|
|
1780
|
+
AIRichResponseMessage.prototype.messageType = null;
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* AIRichResponseMessage submessages.
|
|
1784
|
+
* @member {Array.<waproto.AIRichResponseMessage.IAIRichResponseSubMessage>} submessages
|
|
1785
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1786
|
+
* @instance
|
|
1787
|
+
*/
|
|
1788
|
+
AIRichResponseMessage.prototype.submessages = $util.emptyArray;
|
|
1789
|
+
|
|
1790
|
+
// OneOf field names bound to virtual getters and setters
|
|
1791
|
+
var $oneOfFields;
|
|
1792
|
+
|
|
1793
|
+
// Virtual OneOf for proto3 optional field
|
|
1794
|
+
Object.defineProperty(AIRichResponseMessage.prototype, "_messageType", {
|
|
1795
|
+
get: $util.oneOfGetter($oneOfFields = ["messageType"]),
|
|
1796
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1797
|
+
});
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* Creates a new AIRichResponseMessage instance using the specified properties.
|
|
1801
|
+
* @function create
|
|
1802
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1803
|
+
* @static
|
|
1804
|
+
* @param {waproto.IAIRichResponseMessage=} [properties] Properties to set
|
|
1805
|
+
* @returns {waproto.AIRichResponseMessage} AIRichResponseMessage instance
|
|
1806
|
+
*/
|
|
1807
|
+
AIRichResponseMessage.create = function create(properties) {
|
|
1808
|
+
return new AIRichResponseMessage(properties);
|
|
1809
|
+
};
|
|
1810
|
+
|
|
1811
|
+
/**
|
|
1812
|
+
* Encodes the specified AIRichResponseMessage message. Does not implicitly {@link waproto.AIRichResponseMessage.verify|verify} messages.
|
|
1813
|
+
* @function encode
|
|
1814
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1815
|
+
* @static
|
|
1816
|
+
* @param {waproto.IAIRichResponseMessage} message AIRichResponseMessage message or plain object to encode
|
|
1817
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1818
|
+
* @returns {$protobuf.Writer} Writer
|
|
1819
|
+
*/
|
|
1820
|
+
AIRichResponseMessage.encode = function encode(message, writer) {
|
|
1821
|
+
if (!writer)
|
|
1822
|
+
writer = $Writer.create();
|
|
1823
|
+
if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType"))
|
|
1824
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType);
|
|
1825
|
+
if (message.submessages != null && message.submessages.length)
|
|
1826
|
+
for (var i = 0; i < message.submessages.length; ++i)
|
|
1827
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseSubMessage.encode(message.submessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
1828
|
+
return writer;
|
|
1829
|
+
};
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* Encodes the specified AIRichResponseMessage message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.verify|verify} messages.
|
|
1833
|
+
* @function encodeDelimited
|
|
1834
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1835
|
+
* @static
|
|
1836
|
+
* @param {waproto.IAIRichResponseMessage} message AIRichResponseMessage message or plain object to encode
|
|
1837
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1838
|
+
* @returns {$protobuf.Writer} Writer
|
|
1839
|
+
*/
|
|
1840
|
+
AIRichResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1841
|
+
return this.encode(message, writer).ldelim();
|
|
1842
|
+
};
|
|
1843
|
+
|
|
1844
|
+
/**
|
|
1845
|
+
* Decodes a AIRichResponseMessage message from the specified reader or buffer.
|
|
1846
|
+
* @function decode
|
|
1847
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1848
|
+
* @static
|
|
1849
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1850
|
+
* @param {number} [length] Message length if known beforehand
|
|
1851
|
+
* @returns {waproto.AIRichResponseMessage} AIRichResponseMessage
|
|
1852
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1853
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1854
|
+
*/
|
|
1855
|
+
AIRichResponseMessage.decode = function decode(reader, length) {
|
|
1856
|
+
if (!(reader instanceof $Reader))
|
|
1857
|
+
reader = $Reader.create(reader);
|
|
1858
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage();
|
|
1859
|
+
while (reader.pos < end) {
|
|
1860
|
+
var tag = reader.uint32();
|
|
1861
|
+
switch (tag >>> 3) {
|
|
1862
|
+
case 1: {
|
|
1863
|
+
message.messageType = reader.int32();
|
|
1864
|
+
break;
|
|
1865
|
+
}
|
|
1866
|
+
case 2: {
|
|
1867
|
+
if (!(message.submessages && message.submessages.length))
|
|
1868
|
+
message.submessages = [];
|
|
1869
|
+
message.submessages.push($root.waproto.AIRichResponseMessage.AIRichResponseSubMessage.decode(reader, reader.uint32()));
|
|
1870
|
+
break;
|
|
1871
|
+
}
|
|
1872
|
+
default:
|
|
1873
|
+
reader.skipType(tag & 7);
|
|
1874
|
+
break;
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
return message;
|
|
1878
|
+
};
|
|
1879
|
+
|
|
1880
|
+
/**
|
|
1881
|
+
* Decodes a AIRichResponseMessage message from the specified reader or buffer, length delimited.
|
|
1882
|
+
* @function decodeDelimited
|
|
1883
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1884
|
+
* @static
|
|
1885
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1886
|
+
* @returns {waproto.AIRichResponseMessage} AIRichResponseMessage
|
|
1887
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1888
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1889
|
+
*/
|
|
1890
|
+
AIRichResponseMessage.decodeDelimited = function decodeDelimited(reader) {
|
|
1891
|
+
if (!(reader instanceof $Reader))
|
|
1892
|
+
reader = new $Reader(reader);
|
|
1893
|
+
return this.decode(reader, reader.uint32());
|
|
1894
|
+
};
|
|
1895
|
+
|
|
1896
|
+
/**
|
|
1897
|
+
* Verifies a AIRichResponseMessage message.
|
|
1898
|
+
* @function verify
|
|
1899
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1900
|
+
* @static
|
|
1901
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
1902
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
1903
|
+
*/
|
|
1904
|
+
AIRichResponseMessage.verify = function verify(message) {
|
|
1905
|
+
if (typeof message !== "object" || message === null)
|
|
1906
|
+
return "object expected";
|
|
1907
|
+
var properties = {};
|
|
1908
|
+
if (message.messageType != null && message.hasOwnProperty("messageType")) {
|
|
1909
|
+
properties._messageType = 1;
|
|
1910
|
+
switch (message.messageType) {
|
|
1911
|
+
default:
|
|
1912
|
+
return "messageType: enum value expected";
|
|
1913
|
+
case 0:
|
|
1914
|
+
case 1:
|
|
1915
|
+
case 2:
|
|
1916
|
+
break;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
if (message.submessages != null && message.hasOwnProperty("submessages")) {
|
|
1920
|
+
if (!Array.isArray(message.submessages))
|
|
1921
|
+
return "submessages: array expected";
|
|
1922
|
+
for (var i = 0; i < message.submessages.length; ++i) {
|
|
1923
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseSubMessage.verify(message.submessages[i]);
|
|
1924
|
+
if (error)
|
|
1925
|
+
return "submessages." + error;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
return null;
|
|
1929
|
+
};
|
|
1930
|
+
|
|
1931
|
+
/**
|
|
1932
|
+
* Creates a AIRichResponseMessage message from a plain object. Also converts values to their respective internal types.
|
|
1933
|
+
* @function fromObject
|
|
1934
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1935
|
+
* @static
|
|
1936
|
+
* @param {Object.<string,*>} object Plain object
|
|
1937
|
+
* @returns {waproto.AIRichResponseMessage} AIRichResponseMessage
|
|
1938
|
+
*/
|
|
1939
|
+
AIRichResponseMessage.fromObject = function fromObject(object) {
|
|
1940
|
+
if (object instanceof $root.waproto.AIRichResponseMessage)
|
|
1941
|
+
return object;
|
|
1942
|
+
var message = new $root.waproto.AIRichResponseMessage();
|
|
1943
|
+
switch (object.messageType) {
|
|
1944
|
+
default:
|
|
1945
|
+
if (typeof object.messageType === "number") {
|
|
1946
|
+
message.messageType = object.messageType;
|
|
1947
|
+
break;
|
|
1948
|
+
}
|
|
1949
|
+
break;
|
|
1950
|
+
case "AI_RICH_RESPONSE_TYPE_UNKNOWN":
|
|
1951
|
+
case 0:
|
|
1952
|
+
message.messageType = 0;
|
|
1953
|
+
break;
|
|
1954
|
+
case "AI_RICH_RESPONSE_TYPE_STANDARD":
|
|
1955
|
+
case 1:
|
|
1956
|
+
message.messageType = 1;
|
|
1957
|
+
break;
|
|
1958
|
+
case "AI_RICH_RESPONSE_TYPE_ARTIFACTS":
|
|
1959
|
+
case 2:
|
|
1960
|
+
message.messageType = 2;
|
|
1961
|
+
break;
|
|
1962
|
+
}
|
|
1963
|
+
if (object.submessages) {
|
|
1964
|
+
if (!Array.isArray(object.submessages))
|
|
1965
|
+
throw TypeError(".waproto.AIRichResponseMessage.submessages: array expected");
|
|
1966
|
+
message.submessages = [];
|
|
1967
|
+
for (var i = 0; i < object.submessages.length; ++i) {
|
|
1968
|
+
if (typeof object.submessages[i] !== "object")
|
|
1969
|
+
throw TypeError(".waproto.AIRichResponseMessage.submessages: object expected");
|
|
1970
|
+
message.submessages[i] = $root.waproto.AIRichResponseMessage.AIRichResponseSubMessage.fromObject(object.submessages[i]);
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
return message;
|
|
1974
|
+
};
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* Creates a plain object from a AIRichResponseMessage message. Also converts values to other types if specified.
|
|
1978
|
+
* @function toObject
|
|
1979
|
+
* @memberof waproto.AIRichResponseMessage
|
|
1980
|
+
* @static
|
|
1981
|
+
* @param {waproto.AIRichResponseMessage} message AIRichResponseMessage
|
|
1982
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1983
|
+
* @returns {Object.<string,*>} Plain object
|
|
1984
|
+
*/
|
|
1985
|
+
AIRichResponseMessage.toObject = function toObject(message, options) {
|
|
1986
|
+
if (!options)
|
|
1987
|
+
options = {};
|
|
1988
|
+
var object = {};
|
|
1989
|
+
if (options.arrays || options.defaults)
|
|
1990
|
+
object.submessages = [];
|
|
1991
|
+
if (message.messageType != null && message.hasOwnProperty("messageType")) {
|
|
1992
|
+
object.messageType = options.enums === String ? $root.waproto.AIRichResponseMessage.AIRichResponseMessageType[message.messageType] === undefined ? message.messageType : $root.waproto.AIRichResponseMessage.AIRichResponseMessageType[message.messageType] : message.messageType;
|
|
1993
|
+
if (options.oneofs)
|
|
1994
|
+
object._messageType = "messageType";
|
|
1995
|
+
}
|
|
1996
|
+
if (message.submessages && message.submessages.length) {
|
|
1997
|
+
object.submessages = [];
|
|
1998
|
+
for (var j = 0; j < message.submessages.length; ++j)
|
|
1999
|
+
object.submessages[j] = $root.waproto.AIRichResponseMessage.AIRichResponseSubMessage.toObject(message.submessages[j], options);
|
|
2000
|
+
}
|
|
2001
|
+
return object;
|
|
2002
|
+
};
|
|
2003
|
+
|
|
2004
|
+
/**
|
|
2005
|
+
* Converts this AIRichResponseMessage to JSON.
|
|
2006
|
+
* @function toJSON
|
|
2007
|
+
* @memberof waproto.AIRichResponseMessage
|
|
2008
|
+
* @instance
|
|
2009
|
+
* @returns {Object.<string,*>} JSON object
|
|
2010
|
+
*/
|
|
2011
|
+
AIRichResponseMessage.prototype.toJSON = function toJSON() {
|
|
2012
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2013
|
+
};
|
|
2014
|
+
|
|
2015
|
+
/**
|
|
2016
|
+
* Gets the default type url for AIRichResponseMessage
|
|
2017
|
+
* @function getTypeUrl
|
|
2018
|
+
* @memberof waproto.AIRichResponseMessage
|
|
2019
|
+
* @static
|
|
2020
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
2021
|
+
* @returns {string} The default type url
|
|
2022
|
+
*/
|
|
2023
|
+
AIRichResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
2024
|
+
if (typeUrlPrefix === undefined) {
|
|
2025
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
2026
|
+
}
|
|
2027
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage";
|
|
2028
|
+
};
|
|
2029
|
+
|
|
2030
|
+
AIRichResponseMessage.AIRichResponseCodeMetadata = (function() {
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* Properties of a AIRichResponseCodeMetadata.
|
|
2034
|
+
* @memberof waproto.AIRichResponseMessage
|
|
2035
|
+
* @interface IAIRichResponseCodeMetadata
|
|
2036
|
+
* @property {string|null} [codeLanguage] AIRichResponseCodeMetadata codeLanguage
|
|
2037
|
+
* @property {Array.<waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock>|null} [codeBlocks] AIRichResponseCodeMetadata codeBlocks
|
|
2038
|
+
*/
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* Constructs a new AIRichResponseCodeMetadata.
|
|
2042
|
+
* @memberof waproto.AIRichResponseMessage
|
|
2043
|
+
* @classdesc Represents a AIRichResponseCodeMetadata.
|
|
2044
|
+
* @implements IAIRichResponseCodeMetadata
|
|
2045
|
+
* @constructor
|
|
2046
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseCodeMetadata=} [properties] Properties to set
|
|
2047
|
+
*/
|
|
2048
|
+
function AIRichResponseCodeMetadata(properties) {
|
|
2049
|
+
this.codeBlocks = [];
|
|
2050
|
+
if (properties)
|
|
2051
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2052
|
+
if (properties[keys[i]] != null)
|
|
2053
|
+
this[keys[i]] = properties[keys[i]];
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
/**
|
|
2057
|
+
* AIRichResponseCodeMetadata codeLanguage.
|
|
2058
|
+
* @member {string|null|undefined} codeLanguage
|
|
2059
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2060
|
+
* @instance
|
|
2061
|
+
*/
|
|
2062
|
+
AIRichResponseCodeMetadata.prototype.codeLanguage = null;
|
|
2063
|
+
|
|
2064
|
+
/**
|
|
2065
|
+
* AIRichResponseCodeMetadata codeBlocks.
|
|
2066
|
+
* @member {Array.<waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock>} codeBlocks
|
|
2067
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2068
|
+
* @instance
|
|
2069
|
+
*/
|
|
2070
|
+
AIRichResponseCodeMetadata.prototype.codeBlocks = $util.emptyArray;
|
|
2071
|
+
|
|
2072
|
+
// OneOf field names bound to virtual getters and setters
|
|
2073
|
+
var $oneOfFields;
|
|
2074
|
+
|
|
2075
|
+
// Virtual OneOf for proto3 optional field
|
|
2076
|
+
Object.defineProperty(AIRichResponseCodeMetadata.prototype, "_codeLanguage", {
|
|
2077
|
+
get: $util.oneOfGetter($oneOfFields = ["codeLanguage"]),
|
|
2078
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2079
|
+
});
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* Creates a new AIRichResponseCodeMetadata instance using the specified properties.
|
|
2083
|
+
* @function create
|
|
2084
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2085
|
+
* @static
|
|
2086
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseCodeMetadata=} [properties] Properties to set
|
|
2087
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata instance
|
|
2088
|
+
*/
|
|
2089
|
+
AIRichResponseCodeMetadata.create = function create(properties) {
|
|
2090
|
+
return new AIRichResponseCodeMetadata(properties);
|
|
2091
|
+
};
|
|
2092
|
+
|
|
2093
|
+
/**
|
|
2094
|
+
* Encodes the specified AIRichResponseCodeMetadata message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.verify|verify} messages.
|
|
2095
|
+
* @function encode
|
|
2096
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2097
|
+
* @static
|
|
2098
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseCodeMetadata} message AIRichResponseCodeMetadata message or plain object to encode
|
|
2099
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2100
|
+
* @returns {$protobuf.Writer} Writer
|
|
2101
|
+
*/
|
|
2102
|
+
AIRichResponseCodeMetadata.encode = function encode(message, writer) {
|
|
2103
|
+
if (!writer)
|
|
2104
|
+
writer = $Writer.create();
|
|
2105
|
+
if (message.codeLanguage != null && Object.hasOwnProperty.call(message, "codeLanguage"))
|
|
2106
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.codeLanguage);
|
|
2107
|
+
if (message.codeBlocks != null && message.codeBlocks.length)
|
|
2108
|
+
for (var i = 0; i < message.codeBlocks.length; ++i)
|
|
2109
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.encode(message.codeBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
2110
|
+
return writer;
|
|
2111
|
+
};
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Encodes the specified AIRichResponseCodeMetadata message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.verify|verify} messages.
|
|
2115
|
+
* @function encodeDelimited
|
|
2116
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2117
|
+
* @static
|
|
2118
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseCodeMetadata} message AIRichResponseCodeMetadata message or plain object to encode
|
|
2119
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2120
|
+
* @returns {$protobuf.Writer} Writer
|
|
2121
|
+
*/
|
|
2122
|
+
AIRichResponseCodeMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2123
|
+
return this.encode(message, writer).ldelim();
|
|
2124
|
+
};
|
|
2125
|
+
|
|
2126
|
+
/**
|
|
2127
|
+
* Decodes a AIRichResponseCodeMetadata message from the specified reader or buffer.
|
|
2128
|
+
* @function decode
|
|
2129
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2130
|
+
* @static
|
|
2131
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2132
|
+
* @param {number} [length] Message length if known beforehand
|
|
2133
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata
|
|
2134
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2135
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2136
|
+
*/
|
|
2137
|
+
AIRichResponseCodeMetadata.decode = function decode(reader, length) {
|
|
2138
|
+
if (!(reader instanceof $Reader))
|
|
2139
|
+
reader = $Reader.create(reader);
|
|
2140
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata();
|
|
2141
|
+
while (reader.pos < end) {
|
|
2142
|
+
var tag = reader.uint32();
|
|
2143
|
+
switch (tag >>> 3) {
|
|
2144
|
+
case 1: {
|
|
2145
|
+
message.codeLanguage = reader.string();
|
|
2146
|
+
break;
|
|
2147
|
+
}
|
|
2148
|
+
case 2: {
|
|
2149
|
+
if (!(message.codeBlocks && message.codeBlocks.length))
|
|
2150
|
+
message.codeBlocks = [];
|
|
2151
|
+
message.codeBlocks.push($root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.decode(reader, reader.uint32()));
|
|
2152
|
+
break;
|
|
2153
|
+
}
|
|
2154
|
+
default:
|
|
2155
|
+
reader.skipType(tag & 7);
|
|
2156
|
+
break;
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
return message;
|
|
2160
|
+
};
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* Decodes a AIRichResponseCodeMetadata message from the specified reader or buffer, length delimited.
|
|
2164
|
+
* @function decodeDelimited
|
|
2165
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2166
|
+
* @static
|
|
2167
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2168
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata
|
|
2169
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2170
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2171
|
+
*/
|
|
2172
|
+
AIRichResponseCodeMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
2173
|
+
if (!(reader instanceof $Reader))
|
|
2174
|
+
reader = new $Reader(reader);
|
|
2175
|
+
return this.decode(reader, reader.uint32());
|
|
2176
|
+
};
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* Verifies a AIRichResponseCodeMetadata message.
|
|
2180
|
+
* @function verify
|
|
2181
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2182
|
+
* @static
|
|
2183
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
2184
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2185
|
+
*/
|
|
2186
|
+
AIRichResponseCodeMetadata.verify = function verify(message) {
|
|
2187
|
+
if (typeof message !== "object" || message === null)
|
|
2188
|
+
return "object expected";
|
|
2189
|
+
var properties = {};
|
|
2190
|
+
if (message.codeLanguage != null && message.hasOwnProperty("codeLanguage")) {
|
|
2191
|
+
properties._codeLanguage = 1;
|
|
2192
|
+
if (!$util.isString(message.codeLanguage))
|
|
2193
|
+
return "codeLanguage: string expected";
|
|
2194
|
+
}
|
|
2195
|
+
if (message.codeBlocks != null && message.hasOwnProperty("codeBlocks")) {
|
|
2196
|
+
if (!Array.isArray(message.codeBlocks))
|
|
2197
|
+
return "codeBlocks: array expected";
|
|
2198
|
+
for (var i = 0; i < message.codeBlocks.length; ++i) {
|
|
2199
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify(message.codeBlocks[i]);
|
|
2200
|
+
if (error)
|
|
2201
|
+
return "codeBlocks." + error;
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
return null;
|
|
2205
|
+
};
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* Creates a AIRichResponseCodeMetadata message from a plain object. Also converts values to their respective internal types.
|
|
2209
|
+
* @function fromObject
|
|
2210
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2211
|
+
* @static
|
|
2212
|
+
* @param {Object.<string,*>} object Plain object
|
|
2213
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata
|
|
2214
|
+
*/
|
|
2215
|
+
AIRichResponseCodeMetadata.fromObject = function fromObject(object) {
|
|
2216
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata)
|
|
2217
|
+
return object;
|
|
2218
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata();
|
|
2219
|
+
if (object.codeLanguage != null)
|
|
2220
|
+
message.codeLanguage = String(object.codeLanguage);
|
|
2221
|
+
if (object.codeBlocks) {
|
|
2222
|
+
if (!Array.isArray(object.codeBlocks))
|
|
2223
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.codeBlocks: array expected");
|
|
2224
|
+
message.codeBlocks = [];
|
|
2225
|
+
for (var i = 0; i < object.codeBlocks.length; ++i) {
|
|
2226
|
+
if (typeof object.codeBlocks[i] !== "object")
|
|
2227
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.codeBlocks: object expected");
|
|
2228
|
+
message.codeBlocks[i] = $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.fromObject(object.codeBlocks[i]);
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
return message;
|
|
2232
|
+
};
|
|
2233
|
+
|
|
2234
|
+
/**
|
|
2235
|
+
* Creates a plain object from a AIRichResponseCodeMetadata message. Also converts values to other types if specified.
|
|
2236
|
+
* @function toObject
|
|
2237
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2238
|
+
* @static
|
|
2239
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata} message AIRichResponseCodeMetadata
|
|
2240
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2241
|
+
* @returns {Object.<string,*>} Plain object
|
|
2242
|
+
*/
|
|
2243
|
+
AIRichResponseCodeMetadata.toObject = function toObject(message, options) {
|
|
2244
|
+
if (!options)
|
|
2245
|
+
options = {};
|
|
2246
|
+
var object = {};
|
|
2247
|
+
if (options.arrays || options.defaults)
|
|
2248
|
+
object.codeBlocks = [];
|
|
2249
|
+
if (message.codeLanguage != null && message.hasOwnProperty("codeLanguage")) {
|
|
2250
|
+
object.codeLanguage = message.codeLanguage;
|
|
2251
|
+
if (options.oneofs)
|
|
2252
|
+
object._codeLanguage = "codeLanguage";
|
|
2253
|
+
}
|
|
2254
|
+
if (message.codeBlocks && message.codeBlocks.length) {
|
|
2255
|
+
object.codeBlocks = [];
|
|
2256
|
+
for (var j = 0; j < message.codeBlocks.length; ++j)
|
|
2257
|
+
object.codeBlocks[j] = $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.toObject(message.codeBlocks[j], options);
|
|
2258
|
+
}
|
|
2259
|
+
return object;
|
|
2260
|
+
};
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* Converts this AIRichResponseCodeMetadata to JSON.
|
|
2264
|
+
* @function toJSON
|
|
2265
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2266
|
+
* @instance
|
|
2267
|
+
* @returns {Object.<string,*>} JSON object
|
|
2268
|
+
*/
|
|
2269
|
+
AIRichResponseCodeMetadata.prototype.toJSON = function toJSON() {
|
|
2270
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2271
|
+
};
|
|
2272
|
+
|
|
2273
|
+
/**
|
|
2274
|
+
* Gets the default type url for AIRichResponseCodeMetadata
|
|
2275
|
+
* @function getTypeUrl
|
|
2276
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2277
|
+
* @static
|
|
2278
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
2279
|
+
* @returns {string} The default type url
|
|
2280
|
+
*/
|
|
2281
|
+
AIRichResponseCodeMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
2282
|
+
if (typeUrlPrefix === undefined) {
|
|
2283
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
2284
|
+
}
|
|
2285
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseCodeMetadata";
|
|
2286
|
+
};
|
|
2287
|
+
|
|
2288
|
+
AIRichResponseCodeMetadata.AIRichResponseCodeBlock = (function() {
|
|
2289
|
+
|
|
2290
|
+
/**
|
|
2291
|
+
* Properties of a AIRichResponseCodeBlock.
|
|
2292
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2293
|
+
* @interface IAIRichResponseCodeBlock
|
|
2294
|
+
* @property {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null} [highlightType] AIRichResponseCodeBlock highlightType
|
|
2295
|
+
* @property {string|null} [codeContent] AIRichResponseCodeBlock codeContent
|
|
2296
|
+
*/
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* Constructs a new AIRichResponseCodeBlock.
|
|
2300
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata
|
|
2301
|
+
* @classdesc Represents a AIRichResponseCodeBlock.
|
|
2302
|
+
* @implements IAIRichResponseCodeBlock
|
|
2303
|
+
* @constructor
|
|
2304
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock=} [properties] Properties to set
|
|
2305
|
+
*/
|
|
2306
|
+
function AIRichResponseCodeBlock(properties) {
|
|
2307
|
+
if (properties)
|
|
2308
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2309
|
+
if (properties[keys[i]] != null)
|
|
2310
|
+
this[keys[i]] = properties[keys[i]];
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* AIRichResponseCodeBlock highlightType.
|
|
2315
|
+
* @member {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null|undefined} highlightType
|
|
2316
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2317
|
+
* @instance
|
|
2318
|
+
*/
|
|
2319
|
+
AIRichResponseCodeBlock.prototype.highlightType = null;
|
|
2320
|
+
|
|
2321
|
+
/**
|
|
2322
|
+
* AIRichResponseCodeBlock codeContent.
|
|
2323
|
+
* @member {string|null|undefined} codeContent
|
|
2324
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2325
|
+
* @instance
|
|
2326
|
+
*/
|
|
2327
|
+
AIRichResponseCodeBlock.prototype.codeContent = null;
|
|
2328
|
+
|
|
2329
|
+
// OneOf field names bound to virtual getters and setters
|
|
2330
|
+
var $oneOfFields;
|
|
2331
|
+
|
|
2332
|
+
// Virtual OneOf for proto3 optional field
|
|
2333
|
+
Object.defineProperty(AIRichResponseCodeBlock.prototype, "_highlightType", {
|
|
2334
|
+
get: $util.oneOfGetter($oneOfFields = ["highlightType"]),
|
|
2335
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2336
|
+
});
|
|
2337
|
+
|
|
2338
|
+
// Virtual OneOf for proto3 optional field
|
|
2339
|
+
Object.defineProperty(AIRichResponseCodeBlock.prototype, "_codeContent", {
|
|
2340
|
+
get: $util.oneOfGetter($oneOfFields = ["codeContent"]),
|
|
2341
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2342
|
+
});
|
|
2343
|
+
|
|
2344
|
+
/**
|
|
2345
|
+
* Creates a new AIRichResponseCodeBlock instance using the specified properties.
|
|
2346
|
+
* @function create
|
|
2347
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2348
|
+
* @static
|
|
2349
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock=} [properties] Properties to set
|
|
2350
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock instance
|
|
2351
|
+
*/
|
|
2352
|
+
AIRichResponseCodeBlock.create = function create(properties) {
|
|
2353
|
+
return new AIRichResponseCodeBlock(properties);
|
|
2354
|
+
};
|
|
2355
|
+
|
|
2356
|
+
/**
|
|
2357
|
+
* Encodes the specified AIRichResponseCodeBlock message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages.
|
|
2358
|
+
* @function encode
|
|
2359
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2360
|
+
* @static
|
|
2361
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock} message AIRichResponseCodeBlock message or plain object to encode
|
|
2362
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2363
|
+
* @returns {$protobuf.Writer} Writer
|
|
2364
|
+
*/
|
|
2365
|
+
AIRichResponseCodeBlock.encode = function encode(message, writer) {
|
|
2366
|
+
if (!writer)
|
|
2367
|
+
writer = $Writer.create();
|
|
2368
|
+
if (message.highlightType != null && Object.hasOwnProperty.call(message, "highlightType"))
|
|
2369
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.highlightType);
|
|
2370
|
+
if (message.codeContent != null && Object.hasOwnProperty.call(message, "codeContent"))
|
|
2371
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeContent);
|
|
2372
|
+
return writer;
|
|
2373
|
+
};
|
|
2374
|
+
|
|
2375
|
+
/**
|
|
2376
|
+
* Encodes the specified AIRichResponseCodeBlock message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages.
|
|
2377
|
+
* @function encodeDelimited
|
|
2378
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2379
|
+
* @static
|
|
2380
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock} message AIRichResponseCodeBlock message or plain object to encode
|
|
2381
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2382
|
+
* @returns {$protobuf.Writer} Writer
|
|
2383
|
+
*/
|
|
2384
|
+
AIRichResponseCodeBlock.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2385
|
+
return this.encode(message, writer).ldelim();
|
|
2386
|
+
};
|
|
2387
|
+
|
|
2388
|
+
/**
|
|
2389
|
+
* Decodes a AIRichResponseCodeBlock message from the specified reader or buffer.
|
|
2390
|
+
* @function decode
|
|
2391
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2392
|
+
* @static
|
|
2393
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2394
|
+
* @param {number} [length] Message length if known beforehand
|
|
2395
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock
|
|
2396
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2397
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2398
|
+
*/
|
|
2399
|
+
AIRichResponseCodeBlock.decode = function decode(reader, length) {
|
|
2400
|
+
if (!(reader instanceof $Reader))
|
|
2401
|
+
reader = $Reader.create(reader);
|
|
2402
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock();
|
|
2403
|
+
while (reader.pos < end) {
|
|
2404
|
+
var tag = reader.uint32();
|
|
2405
|
+
switch (tag >>> 3) {
|
|
2406
|
+
case 1: {
|
|
2407
|
+
message.highlightType = reader.int32();
|
|
2408
|
+
break;
|
|
2409
|
+
}
|
|
2410
|
+
case 2: {
|
|
2411
|
+
message.codeContent = reader.string();
|
|
2412
|
+
break;
|
|
2413
|
+
}
|
|
2414
|
+
default:
|
|
2415
|
+
reader.skipType(tag & 7);
|
|
2416
|
+
break;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
return message;
|
|
2420
|
+
};
|
|
2421
|
+
|
|
2422
|
+
/**
|
|
2423
|
+
* Decodes a AIRichResponseCodeBlock message from the specified reader or buffer, length delimited.
|
|
2424
|
+
* @function decodeDelimited
|
|
2425
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2426
|
+
* @static
|
|
2427
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2428
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock
|
|
2429
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2430
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2431
|
+
*/
|
|
2432
|
+
AIRichResponseCodeBlock.decodeDelimited = function decodeDelimited(reader) {
|
|
2433
|
+
if (!(reader instanceof $Reader))
|
|
2434
|
+
reader = new $Reader(reader);
|
|
2435
|
+
return this.decode(reader, reader.uint32());
|
|
2436
|
+
};
|
|
2437
|
+
|
|
2438
|
+
/**
|
|
2439
|
+
* Verifies a AIRichResponseCodeBlock message.
|
|
2440
|
+
* @function verify
|
|
2441
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2442
|
+
* @static
|
|
2443
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
2444
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2445
|
+
*/
|
|
2446
|
+
AIRichResponseCodeBlock.verify = function verify(message) {
|
|
2447
|
+
if (typeof message !== "object" || message === null)
|
|
2448
|
+
return "object expected";
|
|
2449
|
+
var properties = {};
|
|
2450
|
+
if (message.highlightType != null && message.hasOwnProperty("highlightType")) {
|
|
2451
|
+
properties._highlightType = 1;
|
|
2452
|
+
switch (message.highlightType) {
|
|
2453
|
+
default:
|
|
2454
|
+
return "highlightType: enum value expected";
|
|
2455
|
+
case 0:
|
|
2456
|
+
case 1:
|
|
2457
|
+
case 2:
|
|
2458
|
+
case 3:
|
|
2459
|
+
case 4:
|
|
2460
|
+
case 5:
|
|
2461
|
+
break;
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
if (message.codeContent != null && message.hasOwnProperty("codeContent")) {
|
|
2465
|
+
properties._codeContent = 1;
|
|
2466
|
+
if (!$util.isString(message.codeContent))
|
|
2467
|
+
return "codeContent: string expected";
|
|
2468
|
+
}
|
|
2469
|
+
return null;
|
|
2470
|
+
};
|
|
2471
|
+
|
|
2472
|
+
/**
|
|
2473
|
+
* Creates a AIRichResponseCodeBlock message from a plain object. Also converts values to their respective internal types.
|
|
2474
|
+
* @function fromObject
|
|
2475
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2476
|
+
* @static
|
|
2477
|
+
* @param {Object.<string,*>} object Plain object
|
|
2478
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock
|
|
2479
|
+
*/
|
|
2480
|
+
AIRichResponseCodeBlock.fromObject = function fromObject(object) {
|
|
2481
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock)
|
|
2482
|
+
return object;
|
|
2483
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock();
|
|
2484
|
+
switch (object.highlightType) {
|
|
2485
|
+
default:
|
|
2486
|
+
if (typeof object.highlightType === "number") {
|
|
2487
|
+
message.highlightType = object.highlightType;
|
|
2488
|
+
break;
|
|
2489
|
+
}
|
|
2490
|
+
break;
|
|
2491
|
+
case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT":
|
|
2492
|
+
case 0:
|
|
2493
|
+
message.highlightType = 0;
|
|
2494
|
+
break;
|
|
2495
|
+
case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD":
|
|
2496
|
+
case 1:
|
|
2497
|
+
message.highlightType = 1;
|
|
2498
|
+
break;
|
|
2499
|
+
case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD":
|
|
2500
|
+
case 2:
|
|
2501
|
+
message.highlightType = 2;
|
|
2502
|
+
break;
|
|
2503
|
+
case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING":
|
|
2504
|
+
case 3:
|
|
2505
|
+
message.highlightType = 3;
|
|
2506
|
+
break;
|
|
2507
|
+
case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER":
|
|
2508
|
+
case 4:
|
|
2509
|
+
message.highlightType = 4;
|
|
2510
|
+
break;
|
|
2511
|
+
case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT":
|
|
2512
|
+
case 5:
|
|
2513
|
+
message.highlightType = 5;
|
|
2514
|
+
break;
|
|
2515
|
+
}
|
|
2516
|
+
if (object.codeContent != null)
|
|
2517
|
+
message.codeContent = String(object.codeContent);
|
|
2518
|
+
return message;
|
|
2519
|
+
};
|
|
2520
|
+
|
|
2521
|
+
/**
|
|
2522
|
+
* Creates a plain object from a AIRichResponseCodeBlock message. Also converts values to other types if specified.
|
|
2523
|
+
* @function toObject
|
|
2524
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2525
|
+
* @static
|
|
2526
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} message AIRichResponseCodeBlock
|
|
2527
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2528
|
+
* @returns {Object.<string,*>} Plain object
|
|
2529
|
+
*/
|
|
2530
|
+
AIRichResponseCodeBlock.toObject = function toObject(message, options) {
|
|
2531
|
+
if (!options)
|
|
2532
|
+
options = {};
|
|
2533
|
+
var object = {};
|
|
2534
|
+
if (message.highlightType != null && message.hasOwnProperty("highlightType")) {
|
|
2535
|
+
object.highlightType = options.enums === String ? $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] === undefined ? message.highlightType : $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] : message.highlightType;
|
|
2536
|
+
if (options.oneofs)
|
|
2537
|
+
object._highlightType = "highlightType";
|
|
2538
|
+
}
|
|
2539
|
+
if (message.codeContent != null && message.hasOwnProperty("codeContent")) {
|
|
2540
|
+
object.codeContent = message.codeContent;
|
|
2541
|
+
if (options.oneofs)
|
|
2542
|
+
object._codeContent = "codeContent";
|
|
2543
|
+
}
|
|
2544
|
+
return object;
|
|
2545
|
+
};
|
|
2546
|
+
|
|
2547
|
+
/**
|
|
2548
|
+
* Converts this AIRichResponseCodeBlock to JSON.
|
|
2549
|
+
* @function toJSON
|
|
2550
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2551
|
+
* @instance
|
|
2552
|
+
* @returns {Object.<string,*>} JSON object
|
|
2553
|
+
*/
|
|
2554
|
+
AIRichResponseCodeBlock.prototype.toJSON = function toJSON() {
|
|
2555
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2556
|
+
};
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* Gets the default type url for AIRichResponseCodeBlock
|
|
2560
|
+
* @function getTypeUrl
|
|
2561
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
|
|
2562
|
+
* @static
|
|
2563
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
2564
|
+
* @returns {string} The default type url
|
|
2565
|
+
*/
|
|
2566
|
+
AIRichResponseCodeBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
2567
|
+
if (typeUrlPrefix === undefined) {
|
|
2568
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
2569
|
+
}
|
|
2570
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock";
|
|
2571
|
+
};
|
|
2572
|
+
|
|
2573
|
+
return AIRichResponseCodeBlock;
|
|
2574
|
+
})();
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* AIRichResponseCodeHighlightType enum.
|
|
2578
|
+
* @name waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType
|
|
2579
|
+
* @enum {number}
|
|
2580
|
+
* @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT=0 AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT value
|
|
2581
|
+
* @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD=1 AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD value
|
|
2582
|
+
* @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD=2 AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD value
|
|
2583
|
+
* @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING=3 AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING value
|
|
2584
|
+
* @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER=4 AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER value
|
|
2585
|
+
* @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT=5 AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT value
|
|
2586
|
+
*/
|
|
2587
|
+
AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType = (function() {
|
|
2588
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
2589
|
+
values[valuesById[0] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT"] = 0;
|
|
2590
|
+
values[valuesById[1] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD"] = 1;
|
|
2591
|
+
values[valuesById[2] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD"] = 2;
|
|
2592
|
+
values[valuesById[3] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING"] = 3;
|
|
2593
|
+
values[valuesById[4] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER"] = 4;
|
|
2594
|
+
values[valuesById[5] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT"] = 5;
|
|
2595
|
+
return values;
|
|
2596
|
+
})();
|
|
2597
|
+
|
|
2598
|
+
return AIRichResponseCodeMetadata;
|
|
2599
|
+
})();
|
|
2600
|
+
|
|
2601
|
+
AIRichResponseMessage.AIRichResponseDynamicMetadata = (function() {
|
|
2602
|
+
|
|
2603
|
+
/**
|
|
2604
|
+
* Properties of a AIRichResponseDynamicMetadata.
|
|
2605
|
+
* @memberof waproto.AIRichResponseMessage
|
|
2606
|
+
* @interface IAIRichResponseDynamicMetadata
|
|
2607
|
+
* @property {waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null} [type] AIRichResponseDynamicMetadata type
|
|
2608
|
+
* @property {number|Long|null} [version] AIRichResponseDynamicMetadata version
|
|
2609
|
+
* @property {string|null} [url] AIRichResponseDynamicMetadata url
|
|
2610
|
+
* @property {number|null} [loopCount] AIRichResponseDynamicMetadata loopCount
|
|
2611
|
+
*/
|
|
2612
|
+
|
|
2613
|
+
/**
|
|
2614
|
+
* Constructs a new AIRichResponseDynamicMetadata.
|
|
2615
|
+
* @memberof waproto.AIRichResponseMessage
|
|
2616
|
+
* @classdesc Represents a AIRichResponseDynamicMetadata.
|
|
2617
|
+
* @implements IAIRichResponseDynamicMetadata
|
|
2618
|
+
* @constructor
|
|
2619
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseDynamicMetadata=} [properties] Properties to set
|
|
2620
|
+
*/
|
|
2621
|
+
function AIRichResponseDynamicMetadata(properties) {
|
|
2622
|
+
if (properties)
|
|
2623
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2624
|
+
if (properties[keys[i]] != null)
|
|
2625
|
+
this[keys[i]] = properties[keys[i]];
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
/**
|
|
2629
|
+
* AIRichResponseDynamicMetadata type.
|
|
2630
|
+
* @member {waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null|undefined} type
|
|
2631
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2632
|
+
* @instance
|
|
2633
|
+
*/
|
|
2634
|
+
AIRichResponseDynamicMetadata.prototype.type = null;
|
|
2635
|
+
|
|
2636
|
+
/**
|
|
2637
|
+
* AIRichResponseDynamicMetadata version.
|
|
2638
|
+
* @member {number|Long|null|undefined} version
|
|
2639
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2640
|
+
* @instance
|
|
2641
|
+
*/
|
|
2642
|
+
AIRichResponseDynamicMetadata.prototype.version = null;
|
|
2643
|
+
|
|
2644
|
+
/**
|
|
2645
|
+
* AIRichResponseDynamicMetadata url.
|
|
2646
|
+
* @member {string|null|undefined} url
|
|
2647
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2648
|
+
* @instance
|
|
2649
|
+
*/
|
|
2650
|
+
AIRichResponseDynamicMetadata.prototype.url = null;
|
|
2651
|
+
|
|
2652
|
+
/**
|
|
2653
|
+
* AIRichResponseDynamicMetadata loopCount.
|
|
2654
|
+
* @member {number|null|undefined} loopCount
|
|
2655
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2656
|
+
* @instance
|
|
2657
|
+
*/
|
|
2658
|
+
AIRichResponseDynamicMetadata.prototype.loopCount = null;
|
|
2659
|
+
|
|
2660
|
+
// OneOf field names bound to virtual getters and setters
|
|
2661
|
+
var $oneOfFields;
|
|
2662
|
+
|
|
2663
|
+
// Virtual OneOf for proto3 optional field
|
|
2664
|
+
Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_type", {
|
|
2665
|
+
get: $util.oneOfGetter($oneOfFields = ["type"]),
|
|
2666
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2667
|
+
});
|
|
2668
|
+
|
|
2669
|
+
// Virtual OneOf for proto3 optional field
|
|
2670
|
+
Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_version", {
|
|
2671
|
+
get: $util.oneOfGetter($oneOfFields = ["version"]),
|
|
2672
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2673
|
+
});
|
|
2674
|
+
|
|
2675
|
+
// Virtual OneOf for proto3 optional field
|
|
2676
|
+
Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_url", {
|
|
2677
|
+
get: $util.oneOfGetter($oneOfFields = ["url"]),
|
|
2678
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2679
|
+
});
|
|
2680
|
+
|
|
2681
|
+
// Virtual OneOf for proto3 optional field
|
|
2682
|
+
Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_loopCount", {
|
|
2683
|
+
get: $util.oneOfGetter($oneOfFields = ["loopCount"]),
|
|
2684
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2685
|
+
});
|
|
2686
|
+
|
|
2687
|
+
/**
|
|
2688
|
+
* Creates a new AIRichResponseDynamicMetadata instance using the specified properties.
|
|
2689
|
+
* @function create
|
|
2690
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2691
|
+
* @static
|
|
2692
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseDynamicMetadata=} [properties] Properties to set
|
|
2693
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata instance
|
|
2694
|
+
*/
|
|
2695
|
+
AIRichResponseDynamicMetadata.create = function create(properties) {
|
|
2696
|
+
return new AIRichResponseDynamicMetadata(properties);
|
|
2697
|
+
};
|
|
2698
|
+
|
|
2699
|
+
/**
|
|
2700
|
+
* Encodes the specified AIRichResponseDynamicMetadata message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify|verify} messages.
|
|
2701
|
+
* @function encode
|
|
2702
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2703
|
+
* @static
|
|
2704
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata message or plain object to encode
|
|
2705
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2706
|
+
* @returns {$protobuf.Writer} Writer
|
|
2707
|
+
*/
|
|
2708
|
+
AIRichResponseDynamicMetadata.encode = function encode(message, writer) {
|
|
2709
|
+
if (!writer)
|
|
2710
|
+
writer = $Writer.create();
|
|
2711
|
+
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
2712
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
|
|
2713
|
+
if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
|
2714
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version);
|
|
2715
|
+
if (message.url != null && Object.hasOwnProperty.call(message, "url"))
|
|
2716
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.url);
|
|
2717
|
+
if (message.loopCount != null && Object.hasOwnProperty.call(message, "loopCount"))
|
|
2718
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.loopCount);
|
|
2719
|
+
return writer;
|
|
2720
|
+
};
|
|
2721
|
+
|
|
2722
|
+
/**
|
|
2723
|
+
* Encodes the specified AIRichResponseDynamicMetadata message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify|verify} messages.
|
|
2724
|
+
* @function encodeDelimited
|
|
2725
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2726
|
+
* @static
|
|
2727
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata message or plain object to encode
|
|
2728
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2729
|
+
* @returns {$protobuf.Writer} Writer
|
|
2730
|
+
*/
|
|
2731
|
+
AIRichResponseDynamicMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2732
|
+
return this.encode(message, writer).ldelim();
|
|
2733
|
+
};
|
|
2734
|
+
|
|
2735
|
+
/**
|
|
2736
|
+
* Decodes a AIRichResponseDynamicMetadata message from the specified reader or buffer.
|
|
2737
|
+
* @function decode
|
|
2738
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2739
|
+
* @static
|
|
2740
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2741
|
+
* @param {number} [length] Message length if known beforehand
|
|
2742
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata
|
|
2743
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2744
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2745
|
+
*/
|
|
2746
|
+
AIRichResponseDynamicMetadata.decode = function decode(reader, length) {
|
|
2747
|
+
if (!(reader instanceof $Reader))
|
|
2748
|
+
reader = $Reader.create(reader);
|
|
2749
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata();
|
|
2750
|
+
while (reader.pos < end) {
|
|
2751
|
+
var tag = reader.uint32();
|
|
2752
|
+
switch (tag >>> 3) {
|
|
2753
|
+
case 1: {
|
|
2754
|
+
message.type = reader.int32();
|
|
2755
|
+
break;
|
|
2756
|
+
}
|
|
2757
|
+
case 2: {
|
|
2758
|
+
message.version = reader.uint64();
|
|
2759
|
+
break;
|
|
2760
|
+
}
|
|
2761
|
+
case 3: {
|
|
2762
|
+
message.url = reader.string();
|
|
2763
|
+
break;
|
|
2764
|
+
}
|
|
2765
|
+
case 4: {
|
|
2766
|
+
message.loopCount = reader.uint32();
|
|
2767
|
+
break;
|
|
2768
|
+
}
|
|
2769
|
+
default:
|
|
2770
|
+
reader.skipType(tag & 7);
|
|
2771
|
+
break;
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
return message;
|
|
2775
|
+
};
|
|
2776
|
+
|
|
2777
|
+
/**
|
|
2778
|
+
* Decodes a AIRichResponseDynamicMetadata message from the specified reader or buffer, length delimited.
|
|
2779
|
+
* @function decodeDelimited
|
|
2780
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2781
|
+
* @static
|
|
2782
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2783
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata
|
|
2784
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2785
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2786
|
+
*/
|
|
2787
|
+
AIRichResponseDynamicMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
2788
|
+
if (!(reader instanceof $Reader))
|
|
2789
|
+
reader = new $Reader(reader);
|
|
2790
|
+
return this.decode(reader, reader.uint32());
|
|
2791
|
+
};
|
|
2792
|
+
|
|
2793
|
+
/**
|
|
2794
|
+
* Verifies a AIRichResponseDynamicMetadata message.
|
|
2795
|
+
* @function verify
|
|
2796
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2797
|
+
* @static
|
|
2798
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
2799
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2800
|
+
*/
|
|
2801
|
+
AIRichResponseDynamicMetadata.verify = function verify(message) {
|
|
2802
|
+
if (typeof message !== "object" || message === null)
|
|
2803
|
+
return "object expected";
|
|
2804
|
+
var properties = {};
|
|
2805
|
+
if (message.type != null && message.hasOwnProperty("type")) {
|
|
2806
|
+
properties._type = 1;
|
|
2807
|
+
switch (message.type) {
|
|
2808
|
+
default:
|
|
2809
|
+
return "type: enum value expected";
|
|
2810
|
+
case 0:
|
|
2811
|
+
case 1:
|
|
2812
|
+
case 2:
|
|
2813
|
+
break;
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
if (message.version != null && message.hasOwnProperty("version")) {
|
|
2817
|
+
properties._version = 1;
|
|
2818
|
+
if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high)))
|
|
2819
|
+
return "version: integer|Long expected";
|
|
2820
|
+
}
|
|
2821
|
+
if (message.url != null && message.hasOwnProperty("url")) {
|
|
2822
|
+
properties._url = 1;
|
|
2823
|
+
if (!$util.isString(message.url))
|
|
2824
|
+
return "url: string expected";
|
|
2825
|
+
}
|
|
2826
|
+
if (message.loopCount != null && message.hasOwnProperty("loopCount")) {
|
|
2827
|
+
properties._loopCount = 1;
|
|
2828
|
+
if (!$util.isInteger(message.loopCount))
|
|
2829
|
+
return "loopCount: integer expected";
|
|
2830
|
+
}
|
|
2831
|
+
return null;
|
|
2832
|
+
};
|
|
2833
|
+
|
|
2834
|
+
/**
|
|
2835
|
+
* Creates a AIRichResponseDynamicMetadata message from a plain object. Also converts values to their respective internal types.
|
|
2836
|
+
* @function fromObject
|
|
2837
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2838
|
+
* @static
|
|
2839
|
+
* @param {Object.<string,*>} object Plain object
|
|
2840
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata
|
|
2841
|
+
*/
|
|
2842
|
+
AIRichResponseDynamicMetadata.fromObject = function fromObject(object) {
|
|
2843
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata)
|
|
2844
|
+
return object;
|
|
2845
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata();
|
|
2846
|
+
switch (object.type) {
|
|
2847
|
+
default:
|
|
2848
|
+
if (typeof object.type === "number") {
|
|
2849
|
+
message.type = object.type;
|
|
2850
|
+
break;
|
|
2851
|
+
}
|
|
2852
|
+
break;
|
|
2853
|
+
case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN":
|
|
2854
|
+
case 0:
|
|
2855
|
+
message.type = 0;
|
|
2856
|
+
break;
|
|
2857
|
+
case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE":
|
|
2858
|
+
case 1:
|
|
2859
|
+
message.type = 1;
|
|
2860
|
+
break;
|
|
2861
|
+
case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF":
|
|
2862
|
+
case 2:
|
|
2863
|
+
message.type = 2;
|
|
2864
|
+
break;
|
|
2865
|
+
}
|
|
2866
|
+
if (object.version != null)
|
|
2867
|
+
if ($util.Long)
|
|
2868
|
+
(message.version = $util.Long.fromValue(object.version)).unsigned = true;
|
|
2869
|
+
else if (typeof object.version === "string")
|
|
2870
|
+
message.version = parseInt(object.version, 10);
|
|
2871
|
+
else if (typeof object.version === "number")
|
|
2872
|
+
message.version = object.version;
|
|
2873
|
+
else if (typeof object.version === "object")
|
|
2874
|
+
message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true);
|
|
2875
|
+
if (object.url != null)
|
|
2876
|
+
message.url = String(object.url);
|
|
2877
|
+
if (object.loopCount != null)
|
|
2878
|
+
message.loopCount = object.loopCount >>> 0;
|
|
2879
|
+
return message;
|
|
2880
|
+
};
|
|
2881
|
+
|
|
2882
|
+
/**
|
|
2883
|
+
* Creates a plain object from a AIRichResponseDynamicMetadata message. Also converts values to other types if specified.
|
|
2884
|
+
* @function toObject
|
|
2885
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2886
|
+
* @static
|
|
2887
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata
|
|
2888
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2889
|
+
* @returns {Object.<string,*>} Plain object
|
|
2890
|
+
*/
|
|
2891
|
+
AIRichResponseDynamicMetadata.toObject = function toObject(message, options) {
|
|
2892
|
+
if (!options)
|
|
2893
|
+
options = {};
|
|
2894
|
+
var object = {};
|
|
2895
|
+
if (message.type != null && message.hasOwnProperty("type")) {
|
|
2896
|
+
object.type = options.enums === String ? $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] === undefined ? message.type : $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] : message.type;
|
|
2897
|
+
if (options.oneofs)
|
|
2898
|
+
object._type = "type";
|
|
2899
|
+
}
|
|
2900
|
+
if (message.version != null && message.hasOwnProperty("version")) {
|
|
2901
|
+
if (typeof message.version === "number")
|
|
2902
|
+
object.version = options.longs === String ? String(message.version) : message.version;
|
|
2903
|
+
else
|
|
2904
|
+
object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version;
|
|
2905
|
+
if (options.oneofs)
|
|
2906
|
+
object._version = "version";
|
|
2907
|
+
}
|
|
2908
|
+
if (message.url != null && message.hasOwnProperty("url")) {
|
|
2909
|
+
object.url = message.url;
|
|
2910
|
+
if (options.oneofs)
|
|
2911
|
+
object._url = "url";
|
|
2912
|
+
}
|
|
2913
|
+
if (message.loopCount != null && message.hasOwnProperty("loopCount")) {
|
|
2914
|
+
object.loopCount = message.loopCount;
|
|
2915
|
+
if (options.oneofs)
|
|
2916
|
+
object._loopCount = "loopCount";
|
|
2917
|
+
}
|
|
2918
|
+
return object;
|
|
2919
|
+
};
|
|
2920
|
+
|
|
2921
|
+
/**
|
|
2922
|
+
* Converts this AIRichResponseDynamicMetadata to JSON.
|
|
2923
|
+
* @function toJSON
|
|
2924
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2925
|
+
* @instance
|
|
2926
|
+
* @returns {Object.<string,*>} JSON object
|
|
2927
|
+
*/
|
|
2928
|
+
AIRichResponseDynamicMetadata.prototype.toJSON = function toJSON() {
|
|
2929
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2930
|
+
};
|
|
2931
|
+
|
|
2932
|
+
/**
|
|
2933
|
+
* Gets the default type url for AIRichResponseDynamicMetadata
|
|
2934
|
+
* @function getTypeUrl
|
|
2935
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata
|
|
2936
|
+
* @static
|
|
2937
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
2938
|
+
* @returns {string} The default type url
|
|
2939
|
+
*/
|
|
2940
|
+
AIRichResponseDynamicMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
2941
|
+
if (typeUrlPrefix === undefined) {
|
|
2942
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
2943
|
+
}
|
|
2944
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata";
|
|
2945
|
+
};
|
|
2946
|
+
|
|
2947
|
+
/**
|
|
2948
|
+
* AIRichResponseDynamicMetadataType enum.
|
|
2949
|
+
* @name waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType
|
|
2950
|
+
* @enum {number}
|
|
2951
|
+
* @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN=0 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN value
|
|
2952
|
+
* @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE=1 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE value
|
|
2953
|
+
* @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF=2 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF value
|
|
2954
|
+
*/
|
|
2955
|
+
AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType = (function() {
|
|
2956
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
2957
|
+
values[valuesById[0] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN"] = 0;
|
|
2958
|
+
values[valuesById[1] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE"] = 1;
|
|
2959
|
+
values[valuesById[2] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF"] = 2;
|
|
2960
|
+
return values;
|
|
2961
|
+
})();
|
|
2962
|
+
|
|
2963
|
+
return AIRichResponseDynamicMetadata;
|
|
2964
|
+
})();
|
|
2965
|
+
|
|
2966
|
+
AIRichResponseMessage.AIRichResponseGridImageMetadata = (function() {
|
|
2967
|
+
|
|
2968
|
+
/**
|
|
2969
|
+
* Properties of a AIRichResponseGridImageMetadata.
|
|
2970
|
+
* @memberof waproto.AIRichResponseMessage
|
|
2971
|
+
* @interface IAIRichResponseGridImageMetadata
|
|
2972
|
+
* @property {waproto.AIRichResponseMessage.IAIRichResponseImageURL|null} [gridImageUrl] AIRichResponseGridImageMetadata gridImageUrl
|
|
2973
|
+
* @property {Array.<waproto.AIRichResponseMessage.IAIRichResponseImageURL>|null} [imageUrls] AIRichResponseGridImageMetadata imageUrls
|
|
2974
|
+
*/
|
|
2975
|
+
|
|
2976
|
+
/**
|
|
2977
|
+
* Constructs a new AIRichResponseGridImageMetadata.
|
|
2978
|
+
* @memberof waproto.AIRichResponseMessage
|
|
2979
|
+
* @classdesc Represents a AIRichResponseGridImageMetadata.
|
|
2980
|
+
* @implements IAIRichResponseGridImageMetadata
|
|
2981
|
+
* @constructor
|
|
2982
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseGridImageMetadata=} [properties] Properties to set
|
|
2983
|
+
*/
|
|
2984
|
+
function AIRichResponseGridImageMetadata(properties) {
|
|
2985
|
+
this.imageUrls = [];
|
|
2986
|
+
if (properties)
|
|
2987
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2988
|
+
if (properties[keys[i]] != null)
|
|
2989
|
+
this[keys[i]] = properties[keys[i]];
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
/**
|
|
2993
|
+
* AIRichResponseGridImageMetadata gridImageUrl.
|
|
2994
|
+
* @member {waproto.AIRichResponseMessage.IAIRichResponseImageURL|null|undefined} gridImageUrl
|
|
2995
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
2996
|
+
* @instance
|
|
2997
|
+
*/
|
|
2998
|
+
AIRichResponseGridImageMetadata.prototype.gridImageUrl = null;
|
|
2999
|
+
|
|
3000
|
+
/**
|
|
3001
|
+
* AIRichResponseGridImageMetadata imageUrls.
|
|
3002
|
+
* @member {Array.<waproto.AIRichResponseMessage.IAIRichResponseImageURL>} imageUrls
|
|
3003
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3004
|
+
* @instance
|
|
3005
|
+
*/
|
|
3006
|
+
AIRichResponseGridImageMetadata.prototype.imageUrls = $util.emptyArray;
|
|
3007
|
+
|
|
3008
|
+
// OneOf field names bound to virtual getters and setters
|
|
3009
|
+
var $oneOfFields;
|
|
3010
|
+
|
|
3011
|
+
// Virtual OneOf for proto3 optional field
|
|
3012
|
+
Object.defineProperty(AIRichResponseGridImageMetadata.prototype, "_gridImageUrl", {
|
|
3013
|
+
get: $util.oneOfGetter($oneOfFields = ["gridImageUrl"]),
|
|
3014
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3015
|
+
});
|
|
3016
|
+
|
|
3017
|
+
/**
|
|
3018
|
+
* Creates a new AIRichResponseGridImageMetadata instance using the specified properties.
|
|
3019
|
+
* @function create
|
|
3020
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3021
|
+
* @static
|
|
3022
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseGridImageMetadata=} [properties] Properties to set
|
|
3023
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata instance
|
|
3024
|
+
*/
|
|
3025
|
+
AIRichResponseGridImageMetadata.create = function create(properties) {
|
|
3026
|
+
return new AIRichResponseGridImageMetadata(properties);
|
|
3027
|
+
};
|
|
3028
|
+
|
|
3029
|
+
/**
|
|
3030
|
+
* Encodes the specified AIRichResponseGridImageMetadata message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify|verify} messages.
|
|
3031
|
+
* @function encode
|
|
3032
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3033
|
+
* @static
|
|
3034
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata message or plain object to encode
|
|
3035
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3036
|
+
* @returns {$protobuf.Writer} Writer
|
|
3037
|
+
*/
|
|
3038
|
+
AIRichResponseGridImageMetadata.encode = function encode(message, writer) {
|
|
3039
|
+
if (!writer)
|
|
3040
|
+
writer = $Writer.create();
|
|
3041
|
+
if (message.gridImageUrl != null && Object.hasOwnProperty.call(message, "gridImageUrl"))
|
|
3042
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseImageURL.encode(message.gridImageUrl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
3043
|
+
if (message.imageUrls != null && message.imageUrls.length)
|
|
3044
|
+
for (var i = 0; i < message.imageUrls.length; ++i)
|
|
3045
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseImageURL.encode(message.imageUrls[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
3046
|
+
return writer;
|
|
3047
|
+
};
|
|
3048
|
+
|
|
3049
|
+
/**
|
|
3050
|
+
* Encodes the specified AIRichResponseGridImageMetadata message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify|verify} messages.
|
|
3051
|
+
* @function encodeDelimited
|
|
3052
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3053
|
+
* @static
|
|
3054
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata message or plain object to encode
|
|
3055
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3056
|
+
* @returns {$protobuf.Writer} Writer
|
|
3057
|
+
*/
|
|
3058
|
+
AIRichResponseGridImageMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3059
|
+
return this.encode(message, writer).ldelim();
|
|
3060
|
+
};
|
|
3061
|
+
|
|
3062
|
+
/**
|
|
3063
|
+
* Decodes a AIRichResponseGridImageMetadata message from the specified reader or buffer.
|
|
3064
|
+
* @function decode
|
|
3065
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3066
|
+
* @static
|
|
3067
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3068
|
+
* @param {number} [length] Message length if known beforehand
|
|
3069
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata
|
|
3070
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3071
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3072
|
+
*/
|
|
3073
|
+
AIRichResponseGridImageMetadata.decode = function decode(reader, length) {
|
|
3074
|
+
if (!(reader instanceof $Reader))
|
|
3075
|
+
reader = $Reader.create(reader);
|
|
3076
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata();
|
|
3077
|
+
while (reader.pos < end) {
|
|
3078
|
+
var tag = reader.uint32();
|
|
3079
|
+
switch (tag >>> 3) {
|
|
3080
|
+
case 1: {
|
|
3081
|
+
message.gridImageUrl = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.decode(reader, reader.uint32());
|
|
3082
|
+
break;
|
|
3083
|
+
}
|
|
3084
|
+
case 2: {
|
|
3085
|
+
if (!(message.imageUrls && message.imageUrls.length))
|
|
3086
|
+
message.imageUrls = [];
|
|
3087
|
+
message.imageUrls.push($root.waproto.AIRichResponseMessage.AIRichResponseImageURL.decode(reader, reader.uint32()));
|
|
3088
|
+
break;
|
|
3089
|
+
}
|
|
3090
|
+
default:
|
|
3091
|
+
reader.skipType(tag & 7);
|
|
3092
|
+
break;
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
return message;
|
|
3096
|
+
};
|
|
3097
|
+
|
|
3098
|
+
/**
|
|
3099
|
+
* Decodes a AIRichResponseGridImageMetadata message from the specified reader or buffer, length delimited.
|
|
3100
|
+
* @function decodeDelimited
|
|
3101
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3102
|
+
* @static
|
|
3103
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3104
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata
|
|
3105
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3106
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3107
|
+
*/
|
|
3108
|
+
AIRichResponseGridImageMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
3109
|
+
if (!(reader instanceof $Reader))
|
|
3110
|
+
reader = new $Reader(reader);
|
|
3111
|
+
return this.decode(reader, reader.uint32());
|
|
3112
|
+
};
|
|
3113
|
+
|
|
3114
|
+
/**
|
|
3115
|
+
* Verifies a AIRichResponseGridImageMetadata message.
|
|
3116
|
+
* @function verify
|
|
3117
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3118
|
+
* @static
|
|
3119
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3120
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3121
|
+
*/
|
|
3122
|
+
AIRichResponseGridImageMetadata.verify = function verify(message) {
|
|
3123
|
+
if (typeof message !== "object" || message === null)
|
|
3124
|
+
return "object expected";
|
|
3125
|
+
var properties = {};
|
|
3126
|
+
if (message.gridImageUrl != null && message.hasOwnProperty("gridImageUrl")) {
|
|
3127
|
+
properties._gridImageUrl = 1;
|
|
3128
|
+
{
|
|
3129
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.verify(message.gridImageUrl);
|
|
3130
|
+
if (error)
|
|
3131
|
+
return "gridImageUrl." + error;
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
if (message.imageUrls != null && message.hasOwnProperty("imageUrls")) {
|
|
3135
|
+
if (!Array.isArray(message.imageUrls))
|
|
3136
|
+
return "imageUrls: array expected";
|
|
3137
|
+
for (var i = 0; i < message.imageUrls.length; ++i) {
|
|
3138
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.verify(message.imageUrls[i]);
|
|
3139
|
+
if (error)
|
|
3140
|
+
return "imageUrls." + error;
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
return null;
|
|
3144
|
+
};
|
|
3145
|
+
|
|
3146
|
+
/**
|
|
3147
|
+
* Creates a AIRichResponseGridImageMetadata message from a plain object. Also converts values to their respective internal types.
|
|
3148
|
+
* @function fromObject
|
|
3149
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3150
|
+
* @static
|
|
3151
|
+
* @param {Object.<string,*>} object Plain object
|
|
3152
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata
|
|
3153
|
+
*/
|
|
3154
|
+
AIRichResponseGridImageMetadata.fromObject = function fromObject(object) {
|
|
3155
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata)
|
|
3156
|
+
return object;
|
|
3157
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata();
|
|
3158
|
+
if (object.gridImageUrl != null) {
|
|
3159
|
+
if (typeof object.gridImageUrl !== "object")
|
|
3160
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.gridImageUrl: object expected");
|
|
3161
|
+
message.gridImageUrl = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.fromObject(object.gridImageUrl);
|
|
3162
|
+
}
|
|
3163
|
+
if (object.imageUrls) {
|
|
3164
|
+
if (!Array.isArray(object.imageUrls))
|
|
3165
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.imageUrls: array expected");
|
|
3166
|
+
message.imageUrls = [];
|
|
3167
|
+
for (var i = 0; i < object.imageUrls.length; ++i) {
|
|
3168
|
+
if (typeof object.imageUrls[i] !== "object")
|
|
3169
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.imageUrls: object expected");
|
|
3170
|
+
message.imageUrls[i] = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.fromObject(object.imageUrls[i]);
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
return message;
|
|
3174
|
+
};
|
|
3175
|
+
|
|
3176
|
+
/**
|
|
3177
|
+
* Creates a plain object from a AIRichResponseGridImageMetadata message. Also converts values to other types if specified.
|
|
3178
|
+
* @function toObject
|
|
3179
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3180
|
+
* @static
|
|
3181
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata
|
|
3182
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3183
|
+
* @returns {Object.<string,*>} Plain object
|
|
3184
|
+
*/
|
|
3185
|
+
AIRichResponseGridImageMetadata.toObject = function toObject(message, options) {
|
|
3186
|
+
if (!options)
|
|
3187
|
+
options = {};
|
|
3188
|
+
var object = {};
|
|
3189
|
+
if (options.arrays || options.defaults)
|
|
3190
|
+
object.imageUrls = [];
|
|
3191
|
+
if (message.gridImageUrl != null && message.hasOwnProperty("gridImageUrl")) {
|
|
3192
|
+
object.gridImageUrl = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.toObject(message.gridImageUrl, options);
|
|
3193
|
+
if (options.oneofs)
|
|
3194
|
+
object._gridImageUrl = "gridImageUrl";
|
|
3195
|
+
}
|
|
3196
|
+
if (message.imageUrls && message.imageUrls.length) {
|
|
3197
|
+
object.imageUrls = [];
|
|
3198
|
+
for (var j = 0; j < message.imageUrls.length; ++j)
|
|
3199
|
+
object.imageUrls[j] = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.toObject(message.imageUrls[j], options);
|
|
3200
|
+
}
|
|
3201
|
+
return object;
|
|
3202
|
+
};
|
|
3203
|
+
|
|
3204
|
+
/**
|
|
3205
|
+
* Converts this AIRichResponseGridImageMetadata to JSON.
|
|
3206
|
+
* @function toJSON
|
|
3207
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3208
|
+
* @instance
|
|
3209
|
+
* @returns {Object.<string,*>} JSON object
|
|
3210
|
+
*/
|
|
3211
|
+
AIRichResponseGridImageMetadata.prototype.toJSON = function toJSON() {
|
|
3212
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3213
|
+
};
|
|
3214
|
+
|
|
3215
|
+
/**
|
|
3216
|
+
* Gets the default type url for AIRichResponseGridImageMetadata
|
|
3217
|
+
* @function getTypeUrl
|
|
3218
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata
|
|
3219
|
+
* @static
|
|
3220
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3221
|
+
* @returns {string} The default type url
|
|
3222
|
+
*/
|
|
3223
|
+
AIRichResponseGridImageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3224
|
+
if (typeUrlPrefix === undefined) {
|
|
3225
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3226
|
+
}
|
|
3227
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata";
|
|
3228
|
+
};
|
|
3229
|
+
|
|
3230
|
+
return AIRichResponseGridImageMetadata;
|
|
3231
|
+
})();
|
|
3232
|
+
|
|
3233
|
+
AIRichResponseMessage.AIRichResponseImageURL = (function() {
|
|
3234
|
+
|
|
3235
|
+
/**
|
|
3236
|
+
* Properties of a AIRichResponseImageURL.
|
|
3237
|
+
* @memberof waproto.AIRichResponseMessage
|
|
3238
|
+
* @interface IAIRichResponseImageURL
|
|
3239
|
+
* @property {string|null} [imagePreviewUrl] AIRichResponseImageURL imagePreviewUrl
|
|
3240
|
+
* @property {string|null} [imageHighResUrl] AIRichResponseImageURL imageHighResUrl
|
|
3241
|
+
*/
|
|
3242
|
+
|
|
3243
|
+
/**
|
|
3244
|
+
* Constructs a new AIRichResponseImageURL.
|
|
3245
|
+
* @memberof waproto.AIRichResponseMessage
|
|
3246
|
+
* @classdesc Represents a AIRichResponseImageURL.
|
|
3247
|
+
* @implements IAIRichResponseImageURL
|
|
3248
|
+
* @constructor
|
|
3249
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseImageURL=} [properties] Properties to set
|
|
3250
|
+
*/
|
|
3251
|
+
function AIRichResponseImageURL(properties) {
|
|
3252
|
+
if (properties)
|
|
3253
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3254
|
+
if (properties[keys[i]] != null)
|
|
3255
|
+
this[keys[i]] = properties[keys[i]];
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
/**
|
|
3259
|
+
* AIRichResponseImageURL imagePreviewUrl.
|
|
3260
|
+
* @member {string|null|undefined} imagePreviewUrl
|
|
3261
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3262
|
+
* @instance
|
|
3263
|
+
*/
|
|
3264
|
+
AIRichResponseImageURL.prototype.imagePreviewUrl = null;
|
|
3265
|
+
|
|
3266
|
+
/**
|
|
3267
|
+
* AIRichResponseImageURL imageHighResUrl.
|
|
3268
|
+
* @member {string|null|undefined} imageHighResUrl
|
|
3269
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3270
|
+
* @instance
|
|
3271
|
+
*/
|
|
3272
|
+
AIRichResponseImageURL.prototype.imageHighResUrl = null;
|
|
3273
|
+
|
|
3274
|
+
// OneOf field names bound to virtual getters and setters
|
|
3275
|
+
var $oneOfFields;
|
|
3276
|
+
|
|
3277
|
+
// Virtual OneOf for proto3 optional field
|
|
3278
|
+
Object.defineProperty(AIRichResponseImageURL.prototype, "_imagePreviewUrl", {
|
|
3279
|
+
get: $util.oneOfGetter($oneOfFields = ["imagePreviewUrl"]),
|
|
3280
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3281
|
+
});
|
|
3282
|
+
|
|
3283
|
+
// Virtual OneOf for proto3 optional field
|
|
3284
|
+
Object.defineProperty(AIRichResponseImageURL.prototype, "_imageHighResUrl", {
|
|
3285
|
+
get: $util.oneOfGetter($oneOfFields = ["imageHighResUrl"]),
|
|
3286
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3287
|
+
});
|
|
3288
|
+
|
|
3289
|
+
/**
|
|
3290
|
+
* Creates a new AIRichResponseImageURL instance using the specified properties.
|
|
3291
|
+
* @function create
|
|
3292
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3293
|
+
* @static
|
|
3294
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseImageURL=} [properties] Properties to set
|
|
3295
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL instance
|
|
3296
|
+
*/
|
|
3297
|
+
AIRichResponseImageURL.create = function create(properties) {
|
|
3298
|
+
return new AIRichResponseImageURL(properties);
|
|
3299
|
+
};
|
|
3300
|
+
|
|
3301
|
+
/**
|
|
3302
|
+
* Encodes the specified AIRichResponseImageURL message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseImageURL.verify|verify} messages.
|
|
3303
|
+
* @function encode
|
|
3304
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3305
|
+
* @static
|
|
3306
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseImageURL} message AIRichResponseImageURL message or plain object to encode
|
|
3307
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3308
|
+
* @returns {$protobuf.Writer} Writer
|
|
3309
|
+
*/
|
|
3310
|
+
AIRichResponseImageURL.encode = function encode(message, writer) {
|
|
3311
|
+
if (!writer)
|
|
3312
|
+
writer = $Writer.create();
|
|
3313
|
+
if (message.imagePreviewUrl != null && Object.hasOwnProperty.call(message, "imagePreviewUrl"))
|
|
3314
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.imagePreviewUrl);
|
|
3315
|
+
if (message.imageHighResUrl != null && Object.hasOwnProperty.call(message, "imageHighResUrl"))
|
|
3316
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageHighResUrl);
|
|
3317
|
+
return writer;
|
|
3318
|
+
};
|
|
3319
|
+
|
|
3320
|
+
/**
|
|
3321
|
+
* Encodes the specified AIRichResponseImageURL message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseImageURL.verify|verify} messages.
|
|
3322
|
+
* @function encodeDelimited
|
|
3323
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3324
|
+
* @static
|
|
3325
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseImageURL} message AIRichResponseImageURL message or plain object to encode
|
|
3326
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3327
|
+
* @returns {$protobuf.Writer} Writer
|
|
3328
|
+
*/
|
|
3329
|
+
AIRichResponseImageURL.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3330
|
+
return this.encode(message, writer).ldelim();
|
|
3331
|
+
};
|
|
3332
|
+
|
|
3333
|
+
/**
|
|
3334
|
+
* Decodes a AIRichResponseImageURL message from the specified reader or buffer.
|
|
3335
|
+
* @function decode
|
|
3336
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3337
|
+
* @static
|
|
3338
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3339
|
+
* @param {number} [length] Message length if known beforehand
|
|
3340
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL
|
|
3341
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3342
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3343
|
+
*/
|
|
3344
|
+
AIRichResponseImageURL.decode = function decode(reader, length) {
|
|
3345
|
+
if (!(reader instanceof $Reader))
|
|
3346
|
+
reader = $Reader.create(reader);
|
|
3347
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseImageURL();
|
|
3348
|
+
while (reader.pos < end) {
|
|
3349
|
+
var tag = reader.uint32();
|
|
3350
|
+
switch (tag >>> 3) {
|
|
3351
|
+
case 1: {
|
|
3352
|
+
message.imagePreviewUrl = reader.string();
|
|
3353
|
+
break;
|
|
3354
|
+
}
|
|
3355
|
+
case 2: {
|
|
3356
|
+
message.imageHighResUrl = reader.string();
|
|
3357
|
+
break;
|
|
3358
|
+
}
|
|
3359
|
+
default:
|
|
3360
|
+
reader.skipType(tag & 7);
|
|
3361
|
+
break;
|
|
3362
|
+
}
|
|
3363
|
+
}
|
|
3364
|
+
return message;
|
|
3365
|
+
};
|
|
3366
|
+
|
|
3367
|
+
/**
|
|
3368
|
+
* Decodes a AIRichResponseImageURL message from the specified reader or buffer, length delimited.
|
|
3369
|
+
* @function decodeDelimited
|
|
3370
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3371
|
+
* @static
|
|
3372
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3373
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL
|
|
3374
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3375
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3376
|
+
*/
|
|
3377
|
+
AIRichResponseImageURL.decodeDelimited = function decodeDelimited(reader) {
|
|
3378
|
+
if (!(reader instanceof $Reader))
|
|
3379
|
+
reader = new $Reader(reader);
|
|
3380
|
+
return this.decode(reader, reader.uint32());
|
|
3381
|
+
};
|
|
3382
|
+
|
|
3383
|
+
/**
|
|
3384
|
+
* Verifies a AIRichResponseImageURL message.
|
|
3385
|
+
* @function verify
|
|
3386
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3387
|
+
* @static
|
|
3388
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3389
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3390
|
+
*/
|
|
3391
|
+
AIRichResponseImageURL.verify = function verify(message) {
|
|
3392
|
+
if (typeof message !== "object" || message === null)
|
|
3393
|
+
return "object expected";
|
|
3394
|
+
var properties = {};
|
|
3395
|
+
if (message.imagePreviewUrl != null && message.hasOwnProperty("imagePreviewUrl")) {
|
|
3396
|
+
properties._imagePreviewUrl = 1;
|
|
3397
|
+
if (!$util.isString(message.imagePreviewUrl))
|
|
3398
|
+
return "imagePreviewUrl: string expected";
|
|
3399
|
+
}
|
|
3400
|
+
if (message.imageHighResUrl != null && message.hasOwnProperty("imageHighResUrl")) {
|
|
3401
|
+
properties._imageHighResUrl = 1;
|
|
3402
|
+
if (!$util.isString(message.imageHighResUrl))
|
|
3403
|
+
return "imageHighResUrl: string expected";
|
|
3404
|
+
}
|
|
3405
|
+
return null;
|
|
3406
|
+
};
|
|
3407
|
+
|
|
3408
|
+
/**
|
|
3409
|
+
* Creates a AIRichResponseImageURL message from a plain object. Also converts values to their respective internal types.
|
|
3410
|
+
* @function fromObject
|
|
3411
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3412
|
+
* @static
|
|
3413
|
+
* @param {Object.<string,*>} object Plain object
|
|
3414
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL
|
|
3415
|
+
*/
|
|
3416
|
+
AIRichResponseImageURL.fromObject = function fromObject(object) {
|
|
3417
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseImageURL)
|
|
3418
|
+
return object;
|
|
3419
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseImageURL();
|
|
3420
|
+
if (object.imagePreviewUrl != null)
|
|
3421
|
+
message.imagePreviewUrl = String(object.imagePreviewUrl);
|
|
3422
|
+
if (object.imageHighResUrl != null)
|
|
3423
|
+
message.imageHighResUrl = String(object.imageHighResUrl);
|
|
3424
|
+
return message;
|
|
3425
|
+
};
|
|
3426
|
+
|
|
3427
|
+
/**
|
|
3428
|
+
* Creates a plain object from a AIRichResponseImageURL message. Also converts values to other types if specified.
|
|
3429
|
+
* @function toObject
|
|
3430
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3431
|
+
* @static
|
|
3432
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseImageURL} message AIRichResponseImageURL
|
|
3433
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3434
|
+
* @returns {Object.<string,*>} Plain object
|
|
3435
|
+
*/
|
|
3436
|
+
AIRichResponseImageURL.toObject = function toObject(message, options) {
|
|
3437
|
+
if (!options)
|
|
3438
|
+
options = {};
|
|
3439
|
+
var object = {};
|
|
3440
|
+
if (message.imagePreviewUrl != null && message.hasOwnProperty("imagePreviewUrl")) {
|
|
3441
|
+
object.imagePreviewUrl = message.imagePreviewUrl;
|
|
3442
|
+
if (options.oneofs)
|
|
3443
|
+
object._imagePreviewUrl = "imagePreviewUrl";
|
|
3444
|
+
}
|
|
3445
|
+
if (message.imageHighResUrl != null && message.hasOwnProperty("imageHighResUrl")) {
|
|
3446
|
+
object.imageHighResUrl = message.imageHighResUrl;
|
|
3447
|
+
if (options.oneofs)
|
|
3448
|
+
object._imageHighResUrl = "imageHighResUrl";
|
|
3449
|
+
}
|
|
3450
|
+
return object;
|
|
3451
|
+
};
|
|
3452
|
+
|
|
3453
|
+
/**
|
|
3454
|
+
* Converts this AIRichResponseImageURL to JSON.
|
|
3455
|
+
* @function toJSON
|
|
3456
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3457
|
+
* @instance
|
|
3458
|
+
* @returns {Object.<string,*>} JSON object
|
|
3459
|
+
*/
|
|
3460
|
+
AIRichResponseImageURL.prototype.toJSON = function toJSON() {
|
|
3461
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3462
|
+
};
|
|
3463
|
+
|
|
3464
|
+
/**
|
|
3465
|
+
* Gets the default type url for AIRichResponseImageURL
|
|
3466
|
+
* @function getTypeUrl
|
|
3467
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseImageURL
|
|
3468
|
+
* @static
|
|
3469
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3470
|
+
* @returns {string} The default type url
|
|
3471
|
+
*/
|
|
3472
|
+
AIRichResponseImageURL.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3473
|
+
if (typeUrlPrefix === undefined) {
|
|
3474
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3475
|
+
}
|
|
3476
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseImageURL";
|
|
3477
|
+
};
|
|
3478
|
+
|
|
3479
|
+
return AIRichResponseImageURL;
|
|
3480
|
+
})();
|
|
3481
|
+
|
|
3482
|
+
AIRichResponseMessage.AIRichResponseInlineImageMetadata = (function() {
|
|
3483
|
+
|
|
3484
|
+
/**
|
|
3485
|
+
* Properties of a AIRichResponseInlineImageMetadata.
|
|
3486
|
+
* @memberof waproto.AIRichResponseMessage
|
|
3487
|
+
* @interface IAIRichResponseInlineImageMetadata
|
|
3488
|
+
* @property {waproto.AIRichResponseMessage.IAIRichResponseImageURL|null} [imageUrl] AIRichResponseInlineImageMetadata imageUrl
|
|
3489
|
+
* @property {string|null} [imageText] AIRichResponseInlineImageMetadata imageText
|
|
3490
|
+
* @property {waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null} [alignment] AIRichResponseInlineImageMetadata alignment
|
|
3491
|
+
* @property {string|null} [tapLinkUrl] AIRichResponseInlineImageMetadata tapLinkUrl
|
|
3492
|
+
*/
|
|
3493
|
+
|
|
3494
|
+
/**
|
|
3495
|
+
* Constructs a new AIRichResponseInlineImageMetadata.
|
|
3496
|
+
* @memberof waproto.AIRichResponseMessage
|
|
3497
|
+
* @classdesc Represents a AIRichResponseInlineImageMetadata.
|
|
3498
|
+
* @implements IAIRichResponseInlineImageMetadata
|
|
3499
|
+
* @constructor
|
|
3500
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata=} [properties] Properties to set
|
|
3501
|
+
*/
|
|
3502
|
+
function AIRichResponseInlineImageMetadata(properties) {
|
|
3503
|
+
if (properties)
|
|
3504
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3505
|
+
if (properties[keys[i]] != null)
|
|
3506
|
+
this[keys[i]] = properties[keys[i]];
|
|
3507
|
+
}
|
|
3508
|
+
|
|
3509
|
+
/**
|
|
3510
|
+
* AIRichResponseInlineImageMetadata imageUrl.
|
|
3511
|
+
* @member {waproto.AIRichResponseMessage.IAIRichResponseImageURL|null|undefined} imageUrl
|
|
3512
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3513
|
+
* @instance
|
|
3514
|
+
*/
|
|
3515
|
+
AIRichResponseInlineImageMetadata.prototype.imageUrl = null;
|
|
3516
|
+
|
|
3517
|
+
/**
|
|
3518
|
+
* AIRichResponseInlineImageMetadata imageText.
|
|
3519
|
+
* @member {string|null|undefined} imageText
|
|
3520
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3521
|
+
* @instance
|
|
3522
|
+
*/
|
|
3523
|
+
AIRichResponseInlineImageMetadata.prototype.imageText = null;
|
|
3524
|
+
|
|
3525
|
+
/**
|
|
3526
|
+
* AIRichResponseInlineImageMetadata alignment.
|
|
3527
|
+
* @member {waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null|undefined} alignment
|
|
3528
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3529
|
+
* @instance
|
|
3530
|
+
*/
|
|
3531
|
+
AIRichResponseInlineImageMetadata.prototype.alignment = null;
|
|
3532
|
+
|
|
3533
|
+
/**
|
|
3534
|
+
* AIRichResponseInlineImageMetadata tapLinkUrl.
|
|
3535
|
+
* @member {string|null|undefined} tapLinkUrl
|
|
3536
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3537
|
+
* @instance
|
|
3538
|
+
*/
|
|
3539
|
+
AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = null;
|
|
3540
|
+
|
|
3541
|
+
// OneOf field names bound to virtual getters and setters
|
|
3542
|
+
var $oneOfFields;
|
|
3543
|
+
|
|
3544
|
+
// Virtual OneOf for proto3 optional field
|
|
3545
|
+
Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageUrl", {
|
|
3546
|
+
get: $util.oneOfGetter($oneOfFields = ["imageUrl"]),
|
|
3547
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3548
|
+
});
|
|
3549
|
+
|
|
3550
|
+
// Virtual OneOf for proto3 optional field
|
|
3551
|
+
Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageText", {
|
|
3552
|
+
get: $util.oneOfGetter($oneOfFields = ["imageText"]),
|
|
3553
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3554
|
+
});
|
|
3555
|
+
|
|
3556
|
+
// Virtual OneOf for proto3 optional field
|
|
3557
|
+
Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_alignment", {
|
|
3558
|
+
get: $util.oneOfGetter($oneOfFields = ["alignment"]),
|
|
3559
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3560
|
+
});
|
|
3561
|
+
|
|
3562
|
+
// Virtual OneOf for proto3 optional field
|
|
3563
|
+
Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_tapLinkUrl", {
|
|
3564
|
+
get: $util.oneOfGetter($oneOfFields = ["tapLinkUrl"]),
|
|
3565
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3566
|
+
});
|
|
3567
|
+
|
|
3568
|
+
/**
|
|
3569
|
+
* Creates a new AIRichResponseInlineImageMetadata instance using the specified properties.
|
|
3570
|
+
* @function create
|
|
3571
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3572
|
+
* @static
|
|
3573
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata=} [properties] Properties to set
|
|
3574
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata instance
|
|
3575
|
+
*/
|
|
3576
|
+
AIRichResponseInlineImageMetadata.create = function create(properties) {
|
|
3577
|
+
return new AIRichResponseInlineImageMetadata(properties);
|
|
3578
|
+
};
|
|
3579
|
+
|
|
3580
|
+
/**
|
|
3581
|
+
* Encodes the specified AIRichResponseInlineImageMetadata message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify|verify} messages.
|
|
3582
|
+
* @function encode
|
|
3583
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3584
|
+
* @static
|
|
3585
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata message or plain object to encode
|
|
3586
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3587
|
+
* @returns {$protobuf.Writer} Writer
|
|
3588
|
+
*/
|
|
3589
|
+
AIRichResponseInlineImageMetadata.encode = function encode(message, writer) {
|
|
3590
|
+
if (!writer)
|
|
3591
|
+
writer = $Writer.create();
|
|
3592
|
+
if (message.imageUrl != null && Object.hasOwnProperty.call(message, "imageUrl"))
|
|
3593
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseImageURL.encode(message.imageUrl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
3594
|
+
if (message.imageText != null && Object.hasOwnProperty.call(message, "imageText"))
|
|
3595
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageText);
|
|
3596
|
+
if (message.alignment != null && Object.hasOwnProperty.call(message, "alignment"))
|
|
3597
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.alignment);
|
|
3598
|
+
if (message.tapLinkUrl != null && Object.hasOwnProperty.call(message, "tapLinkUrl"))
|
|
3599
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.tapLinkUrl);
|
|
3600
|
+
return writer;
|
|
3601
|
+
};
|
|
3602
|
+
|
|
3603
|
+
/**
|
|
3604
|
+
* Encodes the specified AIRichResponseInlineImageMetadata message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify|verify} messages.
|
|
3605
|
+
* @function encodeDelimited
|
|
3606
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3607
|
+
* @static
|
|
3608
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata message or plain object to encode
|
|
3609
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3610
|
+
* @returns {$protobuf.Writer} Writer
|
|
3611
|
+
*/
|
|
3612
|
+
AIRichResponseInlineImageMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3613
|
+
return this.encode(message, writer).ldelim();
|
|
3614
|
+
};
|
|
3615
|
+
|
|
3616
|
+
/**
|
|
3617
|
+
* Decodes a AIRichResponseInlineImageMetadata message from the specified reader or buffer.
|
|
3618
|
+
* @function decode
|
|
3619
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3620
|
+
* @static
|
|
3621
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3622
|
+
* @param {number} [length] Message length if known beforehand
|
|
3623
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata
|
|
3624
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3625
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3626
|
+
*/
|
|
3627
|
+
AIRichResponseInlineImageMetadata.decode = function decode(reader, length) {
|
|
3628
|
+
if (!(reader instanceof $Reader))
|
|
3629
|
+
reader = $Reader.create(reader);
|
|
3630
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata();
|
|
3631
|
+
while (reader.pos < end) {
|
|
3632
|
+
var tag = reader.uint32();
|
|
3633
|
+
switch (tag >>> 3) {
|
|
3634
|
+
case 1: {
|
|
3635
|
+
message.imageUrl = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.decode(reader, reader.uint32());
|
|
3636
|
+
break;
|
|
3637
|
+
}
|
|
3638
|
+
case 2: {
|
|
3639
|
+
message.imageText = reader.string();
|
|
3640
|
+
break;
|
|
3641
|
+
}
|
|
3642
|
+
case 3: {
|
|
3643
|
+
message.alignment = reader.int32();
|
|
3644
|
+
break;
|
|
3645
|
+
}
|
|
3646
|
+
case 4: {
|
|
3647
|
+
message.tapLinkUrl = reader.string();
|
|
3648
|
+
break;
|
|
3649
|
+
}
|
|
3650
|
+
default:
|
|
3651
|
+
reader.skipType(tag & 7);
|
|
3652
|
+
break;
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
return message;
|
|
3656
|
+
};
|
|
3657
|
+
|
|
3658
|
+
/**
|
|
3659
|
+
* Decodes a AIRichResponseInlineImageMetadata message from the specified reader or buffer, length delimited.
|
|
3660
|
+
* @function decodeDelimited
|
|
3661
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3662
|
+
* @static
|
|
3663
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3664
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata
|
|
3665
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3666
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3667
|
+
*/
|
|
3668
|
+
AIRichResponseInlineImageMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
3669
|
+
if (!(reader instanceof $Reader))
|
|
3670
|
+
reader = new $Reader(reader);
|
|
3671
|
+
return this.decode(reader, reader.uint32());
|
|
3672
|
+
};
|
|
3673
|
+
|
|
3674
|
+
/**
|
|
3675
|
+
* Verifies a AIRichResponseInlineImageMetadata message.
|
|
3676
|
+
* @function verify
|
|
3677
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3678
|
+
* @static
|
|
3679
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3680
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3681
|
+
*/
|
|
3682
|
+
AIRichResponseInlineImageMetadata.verify = function verify(message) {
|
|
3683
|
+
if (typeof message !== "object" || message === null)
|
|
3684
|
+
return "object expected";
|
|
3685
|
+
var properties = {};
|
|
3686
|
+
if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
|
|
3687
|
+
properties._imageUrl = 1;
|
|
3688
|
+
{
|
|
3689
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.verify(message.imageUrl);
|
|
3690
|
+
if (error)
|
|
3691
|
+
return "imageUrl." + error;
|
|
3692
|
+
}
|
|
3693
|
+
}
|
|
3694
|
+
if (message.imageText != null && message.hasOwnProperty("imageText")) {
|
|
3695
|
+
properties._imageText = 1;
|
|
3696
|
+
if (!$util.isString(message.imageText))
|
|
3697
|
+
return "imageText: string expected";
|
|
3698
|
+
}
|
|
3699
|
+
if (message.alignment != null && message.hasOwnProperty("alignment")) {
|
|
3700
|
+
properties._alignment = 1;
|
|
3701
|
+
switch (message.alignment) {
|
|
3702
|
+
default:
|
|
3703
|
+
return "alignment: enum value expected";
|
|
3704
|
+
case 0:
|
|
3705
|
+
case 1:
|
|
3706
|
+
case 2:
|
|
3707
|
+
break;
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl")) {
|
|
3711
|
+
properties._tapLinkUrl = 1;
|
|
3712
|
+
if (!$util.isString(message.tapLinkUrl))
|
|
3713
|
+
return "tapLinkUrl: string expected";
|
|
3714
|
+
}
|
|
3715
|
+
return null;
|
|
3716
|
+
};
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* Creates a AIRichResponseInlineImageMetadata message from a plain object. Also converts values to their respective internal types.
|
|
3720
|
+
* @function fromObject
|
|
3721
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3722
|
+
* @static
|
|
3723
|
+
* @param {Object.<string,*>} object Plain object
|
|
3724
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata
|
|
3725
|
+
*/
|
|
3726
|
+
AIRichResponseInlineImageMetadata.fromObject = function fromObject(object) {
|
|
3727
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata)
|
|
3728
|
+
return object;
|
|
3729
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata();
|
|
3730
|
+
if (object.imageUrl != null) {
|
|
3731
|
+
if (typeof object.imageUrl !== "object")
|
|
3732
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.imageUrl: object expected");
|
|
3733
|
+
message.imageUrl = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.fromObject(object.imageUrl);
|
|
3734
|
+
}
|
|
3735
|
+
if (object.imageText != null)
|
|
3736
|
+
message.imageText = String(object.imageText);
|
|
3737
|
+
switch (object.alignment) {
|
|
3738
|
+
default:
|
|
3739
|
+
if (typeof object.alignment === "number") {
|
|
3740
|
+
message.alignment = object.alignment;
|
|
3741
|
+
break;
|
|
3742
|
+
}
|
|
3743
|
+
break;
|
|
3744
|
+
case "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED":
|
|
3745
|
+
case 0:
|
|
3746
|
+
message.alignment = 0;
|
|
3747
|
+
break;
|
|
3748
|
+
case "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED":
|
|
3749
|
+
case 1:
|
|
3750
|
+
message.alignment = 1;
|
|
3751
|
+
break;
|
|
3752
|
+
case "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED":
|
|
3753
|
+
case 2:
|
|
3754
|
+
message.alignment = 2;
|
|
3755
|
+
break;
|
|
3756
|
+
}
|
|
3757
|
+
if (object.tapLinkUrl != null)
|
|
3758
|
+
message.tapLinkUrl = String(object.tapLinkUrl);
|
|
3759
|
+
return message;
|
|
3760
|
+
};
|
|
3761
|
+
|
|
3762
|
+
/**
|
|
3763
|
+
* Creates a plain object from a AIRichResponseInlineImageMetadata message. Also converts values to other types if specified.
|
|
3764
|
+
* @function toObject
|
|
3765
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3766
|
+
* @static
|
|
3767
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata
|
|
3768
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3769
|
+
* @returns {Object.<string,*>} Plain object
|
|
3770
|
+
*/
|
|
3771
|
+
AIRichResponseInlineImageMetadata.toObject = function toObject(message, options) {
|
|
3772
|
+
if (!options)
|
|
3773
|
+
options = {};
|
|
3774
|
+
var object = {};
|
|
3775
|
+
if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
|
|
3776
|
+
object.imageUrl = $root.waproto.AIRichResponseMessage.AIRichResponseImageURL.toObject(message.imageUrl, options);
|
|
3777
|
+
if (options.oneofs)
|
|
3778
|
+
object._imageUrl = "imageUrl";
|
|
3779
|
+
}
|
|
3780
|
+
if (message.imageText != null && message.hasOwnProperty("imageText")) {
|
|
3781
|
+
object.imageText = message.imageText;
|
|
3782
|
+
if (options.oneofs)
|
|
3783
|
+
object._imageText = "imageText";
|
|
3784
|
+
}
|
|
3785
|
+
if (message.alignment != null && message.hasOwnProperty("alignment")) {
|
|
3786
|
+
object.alignment = options.enums === String ? $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] === undefined ? message.alignment : $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] : message.alignment;
|
|
3787
|
+
if (options.oneofs)
|
|
3788
|
+
object._alignment = "alignment";
|
|
3789
|
+
}
|
|
3790
|
+
if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl")) {
|
|
3791
|
+
object.tapLinkUrl = message.tapLinkUrl;
|
|
3792
|
+
if (options.oneofs)
|
|
3793
|
+
object._tapLinkUrl = "tapLinkUrl";
|
|
3794
|
+
}
|
|
3795
|
+
return object;
|
|
3796
|
+
};
|
|
3797
|
+
|
|
3798
|
+
/**
|
|
3799
|
+
* Converts this AIRichResponseInlineImageMetadata to JSON.
|
|
3800
|
+
* @function toJSON
|
|
3801
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3802
|
+
* @instance
|
|
3803
|
+
* @returns {Object.<string,*>} JSON object
|
|
3804
|
+
*/
|
|
3805
|
+
AIRichResponseInlineImageMetadata.prototype.toJSON = function toJSON() {
|
|
3806
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3807
|
+
};
|
|
3808
|
+
|
|
3809
|
+
/**
|
|
3810
|
+
* Gets the default type url for AIRichResponseInlineImageMetadata
|
|
3811
|
+
* @function getTypeUrl
|
|
3812
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata
|
|
3813
|
+
* @static
|
|
3814
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3815
|
+
* @returns {string} The default type url
|
|
3816
|
+
*/
|
|
3817
|
+
AIRichResponseInlineImageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3818
|
+
if (typeUrlPrefix === undefined) {
|
|
3819
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3820
|
+
}
|
|
3821
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata";
|
|
3822
|
+
};
|
|
3823
|
+
|
|
3824
|
+
/**
|
|
3825
|
+
* AIRichResponseImageAlignment enum.
|
|
3826
|
+
* @name waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment
|
|
3827
|
+
* @enum {number}
|
|
3828
|
+
* @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED=0 AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED value
|
|
3829
|
+
* @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED=1 AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED value
|
|
3830
|
+
* @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED=2 AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED value
|
|
3831
|
+
*/
|
|
3832
|
+
AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment = (function() {
|
|
3833
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
3834
|
+
values[valuesById[0] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED"] = 0;
|
|
3835
|
+
values[valuesById[1] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED"] = 1;
|
|
3836
|
+
values[valuesById[2] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED"] = 2;
|
|
3837
|
+
return values;
|
|
3838
|
+
})();
|
|
3839
|
+
|
|
3840
|
+
return AIRichResponseInlineImageMetadata;
|
|
3841
|
+
})();
|
|
3842
|
+
|
|
3843
|
+
/**
|
|
3844
|
+
* AIRichResponseMessageType enum.
|
|
3845
|
+
* @name waproto.AIRichResponseMessage.AIRichResponseMessageType
|
|
3846
|
+
* @enum {number}
|
|
3847
|
+
* @property {number} AI_RICH_RESPONSE_TYPE_UNKNOWN=0 AI_RICH_RESPONSE_TYPE_UNKNOWN value
|
|
3848
|
+
* @property {number} AI_RICH_RESPONSE_TYPE_STANDARD=1 AI_RICH_RESPONSE_TYPE_STANDARD value
|
|
3849
|
+
* @property {number} AI_RICH_RESPONSE_TYPE_ARTIFACTS=2 AI_RICH_RESPONSE_TYPE_ARTIFACTS value
|
|
3850
|
+
*/
|
|
3851
|
+
AIRichResponseMessage.AIRichResponseMessageType = (function() {
|
|
3852
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
3853
|
+
values[valuesById[0] = "AI_RICH_RESPONSE_TYPE_UNKNOWN"] = 0;
|
|
3854
|
+
values[valuesById[1] = "AI_RICH_RESPONSE_TYPE_STANDARD"] = 1;
|
|
3855
|
+
values[valuesById[2] = "AI_RICH_RESPONSE_TYPE_ARTIFACTS"] = 2;
|
|
3856
|
+
return values;
|
|
3857
|
+
})();
|
|
3858
|
+
|
|
3859
|
+
AIRichResponseMessage.AIRichResponseSubMessage = (function() {
|
|
3860
|
+
|
|
3861
|
+
/**
|
|
3862
|
+
* Properties of a AIRichResponseSubMessage.
|
|
3863
|
+
* @memberof waproto.AIRichResponseMessage
|
|
3864
|
+
* @interface IAIRichResponseSubMessage
|
|
3865
|
+
* @property {waproto.AIRichResponseMessage.AIRichResponseSubMessageType|null} [messageType] AIRichResponseSubMessage messageType
|
|
3866
|
+
* @property {waproto.AIRichResponseMessage.IAIRichResponseGridImageMetadata|null} [gridImageMetadata] AIRichResponseSubMessage gridImageMetadata
|
|
3867
|
+
* @property {string|null} [messageText] AIRichResponseSubMessage messageText
|
|
3868
|
+
* @property {waproto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata|null} [imageMetadata] AIRichResponseSubMessage imageMetadata
|
|
3869
|
+
* @property {waproto.AIRichResponseMessage.IAIRichResponseCodeMetadata|null} [codeMetadata] AIRichResponseSubMessage codeMetadata
|
|
3870
|
+
* @property {waproto.AIRichResponseMessage.IAIRichResponseTableMetadata|null} [tableMetadata] AIRichResponseSubMessage tableMetadata
|
|
3871
|
+
* @property {waproto.AIRichResponseMessage.IAIRichResponseDynamicMetadata|null} [dynamicMetadata] AIRichResponseSubMessage dynamicMetadata
|
|
3872
|
+
*/
|
|
3873
|
+
|
|
3874
|
+
/**
|
|
3875
|
+
* Constructs a new AIRichResponseSubMessage.
|
|
3876
|
+
* @memberof waproto.AIRichResponseMessage
|
|
3877
|
+
* @classdesc Represents a AIRichResponseSubMessage.
|
|
3878
|
+
* @implements IAIRichResponseSubMessage
|
|
3879
|
+
* @constructor
|
|
3880
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseSubMessage=} [properties] Properties to set
|
|
3881
|
+
*/
|
|
3882
|
+
function AIRichResponseSubMessage(properties) {
|
|
3883
|
+
if (properties)
|
|
3884
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3885
|
+
if (properties[keys[i]] != null)
|
|
3886
|
+
this[keys[i]] = properties[keys[i]];
|
|
3887
|
+
}
|
|
3888
|
+
|
|
3889
|
+
/**
|
|
3890
|
+
* AIRichResponseSubMessage messageType.
|
|
3891
|
+
* @member {waproto.AIRichResponseMessage.AIRichResponseSubMessageType|null|undefined} messageType
|
|
3892
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
3893
|
+
* @instance
|
|
3894
|
+
*/
|
|
3895
|
+
AIRichResponseSubMessage.prototype.messageType = null;
|
|
3896
|
+
|
|
3897
|
+
/**
|
|
3898
|
+
* AIRichResponseSubMessage gridImageMetadata.
|
|
3899
|
+
* @member {waproto.AIRichResponseMessage.IAIRichResponseGridImageMetadata|null|undefined} gridImageMetadata
|
|
3900
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
3901
|
+
* @instance
|
|
3902
|
+
*/
|
|
3903
|
+
AIRichResponseSubMessage.prototype.gridImageMetadata = null;
|
|
3904
|
+
|
|
3905
|
+
/**
|
|
3906
|
+
* AIRichResponseSubMessage messageText.
|
|
3907
|
+
* @member {string|null|undefined} messageText
|
|
3908
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
3909
|
+
* @instance
|
|
3910
|
+
*/
|
|
3911
|
+
AIRichResponseSubMessage.prototype.messageText = null;
|
|
3912
|
+
|
|
3913
|
+
/**
|
|
3914
|
+
* AIRichResponseSubMessage imageMetadata.
|
|
3915
|
+
* @member {waproto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata|null|undefined} imageMetadata
|
|
3916
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
3917
|
+
* @instance
|
|
3918
|
+
*/
|
|
3919
|
+
AIRichResponseSubMessage.prototype.imageMetadata = null;
|
|
3920
|
+
|
|
3921
|
+
/**
|
|
3922
|
+
* AIRichResponseSubMessage codeMetadata.
|
|
3923
|
+
* @member {waproto.AIRichResponseMessage.IAIRichResponseCodeMetadata|null|undefined} codeMetadata
|
|
3924
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
3925
|
+
* @instance
|
|
3926
|
+
*/
|
|
3927
|
+
AIRichResponseSubMessage.prototype.codeMetadata = null;
|
|
3928
|
+
|
|
3929
|
+
/**
|
|
3930
|
+
* AIRichResponseSubMessage tableMetadata.
|
|
3931
|
+
* @member {waproto.AIRichResponseMessage.IAIRichResponseTableMetadata|null|undefined} tableMetadata
|
|
3932
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
3933
|
+
* @instance
|
|
3934
|
+
*/
|
|
3935
|
+
AIRichResponseSubMessage.prototype.tableMetadata = null;
|
|
3936
|
+
|
|
3937
|
+
/**
|
|
3938
|
+
* AIRichResponseSubMessage dynamicMetadata.
|
|
3939
|
+
* @member {waproto.AIRichResponseMessage.IAIRichResponseDynamicMetadata|null|undefined} dynamicMetadata
|
|
3940
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
3941
|
+
* @instance
|
|
3942
|
+
*/
|
|
3943
|
+
AIRichResponseSubMessage.prototype.dynamicMetadata = null;
|
|
3944
|
+
|
|
3945
|
+
// OneOf field names bound to virtual getters and setters
|
|
3946
|
+
var $oneOfFields;
|
|
3947
|
+
|
|
3948
|
+
// Virtual OneOf for proto3 optional field
|
|
3949
|
+
Object.defineProperty(AIRichResponseSubMessage.prototype, "_messageType", {
|
|
3950
|
+
get: $util.oneOfGetter($oneOfFields = ["messageType"]),
|
|
3951
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3952
|
+
});
|
|
3953
|
+
|
|
3954
|
+
// Virtual OneOf for proto3 optional field
|
|
3955
|
+
Object.defineProperty(AIRichResponseSubMessage.prototype, "_gridImageMetadata", {
|
|
3956
|
+
get: $util.oneOfGetter($oneOfFields = ["gridImageMetadata"]),
|
|
3957
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3958
|
+
});
|
|
3959
|
+
|
|
3960
|
+
// Virtual OneOf for proto3 optional field
|
|
3961
|
+
Object.defineProperty(AIRichResponseSubMessage.prototype, "_messageText", {
|
|
3962
|
+
get: $util.oneOfGetter($oneOfFields = ["messageText"]),
|
|
3963
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3964
|
+
});
|
|
3965
|
+
|
|
3966
|
+
// Virtual OneOf for proto3 optional field
|
|
3967
|
+
Object.defineProperty(AIRichResponseSubMessage.prototype, "_imageMetadata", {
|
|
3968
|
+
get: $util.oneOfGetter($oneOfFields = ["imageMetadata"]),
|
|
3969
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3970
|
+
});
|
|
3971
|
+
|
|
3972
|
+
// Virtual OneOf for proto3 optional field
|
|
3973
|
+
Object.defineProperty(AIRichResponseSubMessage.prototype, "_codeMetadata", {
|
|
3974
|
+
get: $util.oneOfGetter($oneOfFields = ["codeMetadata"]),
|
|
3975
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3976
|
+
});
|
|
3977
|
+
|
|
3978
|
+
// Virtual OneOf for proto3 optional field
|
|
3979
|
+
Object.defineProperty(AIRichResponseSubMessage.prototype, "_tableMetadata", {
|
|
3980
|
+
get: $util.oneOfGetter($oneOfFields = ["tableMetadata"]),
|
|
3981
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3982
|
+
});
|
|
3983
|
+
|
|
3984
|
+
// Virtual OneOf for proto3 optional field
|
|
3985
|
+
Object.defineProperty(AIRichResponseSubMessage.prototype, "_dynamicMetadata", {
|
|
3986
|
+
get: $util.oneOfGetter($oneOfFields = ["dynamicMetadata"]),
|
|
3987
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
3988
|
+
});
|
|
3989
|
+
|
|
3990
|
+
/**
|
|
3991
|
+
* Creates a new AIRichResponseSubMessage instance using the specified properties.
|
|
3992
|
+
* @function create
|
|
3993
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
3994
|
+
* @static
|
|
3995
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseSubMessage=} [properties] Properties to set
|
|
3996
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage instance
|
|
3997
|
+
*/
|
|
3998
|
+
AIRichResponseSubMessage.create = function create(properties) {
|
|
3999
|
+
return new AIRichResponseSubMessage(properties);
|
|
4000
|
+
};
|
|
4001
|
+
|
|
4002
|
+
/**
|
|
4003
|
+
* Encodes the specified AIRichResponseSubMessage message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseSubMessage.verify|verify} messages.
|
|
4004
|
+
* @function encode
|
|
4005
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4006
|
+
* @static
|
|
4007
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseSubMessage} message AIRichResponseSubMessage message or plain object to encode
|
|
4008
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4009
|
+
* @returns {$protobuf.Writer} Writer
|
|
4010
|
+
*/
|
|
4011
|
+
AIRichResponseSubMessage.encode = function encode(message, writer) {
|
|
4012
|
+
if (!writer)
|
|
4013
|
+
writer = $Writer.create();
|
|
4014
|
+
if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType"))
|
|
4015
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType);
|
|
4016
|
+
if (message.gridImageMetadata != null && Object.hasOwnProperty.call(message, "gridImageMetadata"))
|
|
4017
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.encode(message.gridImageMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
4018
|
+
if (message.messageText != null && Object.hasOwnProperty.call(message, "messageText"))
|
|
4019
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageText);
|
|
4020
|
+
if (message.imageMetadata != null && Object.hasOwnProperty.call(message, "imageMetadata"))
|
|
4021
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.encode(message.imageMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
4022
|
+
if (message.codeMetadata != null && Object.hasOwnProperty.call(message, "codeMetadata"))
|
|
4023
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.encode(message.codeMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
4024
|
+
if (message.tableMetadata != null && Object.hasOwnProperty.call(message, "tableMetadata"))
|
|
4025
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.encode(message.tableMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
4026
|
+
if (message.dynamicMetadata != null && Object.hasOwnProperty.call(message, "dynamicMetadata"))
|
|
4027
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.encode(message.dynamicMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
4028
|
+
return writer;
|
|
4029
|
+
};
|
|
4030
|
+
|
|
4031
|
+
/**
|
|
4032
|
+
* Encodes the specified AIRichResponseSubMessage message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseSubMessage.verify|verify} messages.
|
|
4033
|
+
* @function encodeDelimited
|
|
4034
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4035
|
+
* @static
|
|
4036
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseSubMessage} message AIRichResponseSubMessage message or plain object to encode
|
|
4037
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4038
|
+
* @returns {$protobuf.Writer} Writer
|
|
4039
|
+
*/
|
|
4040
|
+
AIRichResponseSubMessage.encodeDelimited = function encodeDelimited(message, writer) {
|
|
4041
|
+
return this.encode(message, writer).ldelim();
|
|
4042
|
+
};
|
|
4043
|
+
|
|
4044
|
+
/**
|
|
4045
|
+
* Decodes a AIRichResponseSubMessage message from the specified reader or buffer.
|
|
4046
|
+
* @function decode
|
|
4047
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4048
|
+
* @static
|
|
4049
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4050
|
+
* @param {number} [length] Message length if known beforehand
|
|
4051
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage
|
|
4052
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4053
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4054
|
+
*/
|
|
4055
|
+
AIRichResponseSubMessage.decode = function decode(reader, length) {
|
|
4056
|
+
if (!(reader instanceof $Reader))
|
|
4057
|
+
reader = $Reader.create(reader);
|
|
4058
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseSubMessage();
|
|
4059
|
+
while (reader.pos < end) {
|
|
4060
|
+
var tag = reader.uint32();
|
|
4061
|
+
switch (tag >>> 3) {
|
|
4062
|
+
case 1: {
|
|
4063
|
+
message.messageType = reader.int32();
|
|
4064
|
+
break;
|
|
4065
|
+
}
|
|
4066
|
+
case 2: {
|
|
4067
|
+
message.gridImageMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.decode(reader, reader.uint32());
|
|
4068
|
+
break;
|
|
4069
|
+
}
|
|
4070
|
+
case 3: {
|
|
4071
|
+
message.messageText = reader.string();
|
|
4072
|
+
break;
|
|
4073
|
+
}
|
|
4074
|
+
case 4: {
|
|
4075
|
+
message.imageMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.decode(reader, reader.uint32());
|
|
4076
|
+
break;
|
|
4077
|
+
}
|
|
4078
|
+
case 5: {
|
|
4079
|
+
message.codeMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.decode(reader, reader.uint32());
|
|
4080
|
+
break;
|
|
4081
|
+
}
|
|
4082
|
+
case 6: {
|
|
4083
|
+
message.tableMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.decode(reader, reader.uint32());
|
|
4084
|
+
break;
|
|
4085
|
+
}
|
|
4086
|
+
case 7: {
|
|
4087
|
+
message.dynamicMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.decode(reader, reader.uint32());
|
|
4088
|
+
break;
|
|
4089
|
+
}
|
|
4090
|
+
default:
|
|
4091
|
+
reader.skipType(tag & 7);
|
|
4092
|
+
break;
|
|
4093
|
+
}
|
|
4094
|
+
}
|
|
4095
|
+
return message;
|
|
4096
|
+
};
|
|
4097
|
+
|
|
4098
|
+
/**
|
|
4099
|
+
* Decodes a AIRichResponseSubMessage message from the specified reader or buffer, length delimited.
|
|
4100
|
+
* @function decodeDelimited
|
|
4101
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4102
|
+
* @static
|
|
4103
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4104
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage
|
|
4105
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4106
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4107
|
+
*/
|
|
4108
|
+
AIRichResponseSubMessage.decodeDelimited = function decodeDelimited(reader) {
|
|
4109
|
+
if (!(reader instanceof $Reader))
|
|
4110
|
+
reader = new $Reader(reader);
|
|
4111
|
+
return this.decode(reader, reader.uint32());
|
|
4112
|
+
};
|
|
4113
|
+
|
|
4114
|
+
/**
|
|
4115
|
+
* Verifies a AIRichResponseSubMessage message.
|
|
4116
|
+
* @function verify
|
|
4117
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4118
|
+
* @static
|
|
4119
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
4120
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
4121
|
+
*/
|
|
4122
|
+
AIRichResponseSubMessage.verify = function verify(message) {
|
|
4123
|
+
if (typeof message !== "object" || message === null)
|
|
4124
|
+
return "object expected";
|
|
4125
|
+
var properties = {};
|
|
4126
|
+
if (message.messageType != null && message.hasOwnProperty("messageType")) {
|
|
4127
|
+
properties._messageType = 1;
|
|
4128
|
+
switch (message.messageType) {
|
|
4129
|
+
default:
|
|
4130
|
+
return "messageType: enum value expected";
|
|
4131
|
+
case 0:
|
|
4132
|
+
case 1:
|
|
4133
|
+
case 2:
|
|
4134
|
+
case 3:
|
|
4135
|
+
case 4:
|
|
4136
|
+
case 5:
|
|
4137
|
+
case 6:
|
|
4138
|
+
break;
|
|
4139
|
+
}
|
|
4140
|
+
}
|
|
4141
|
+
if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata")) {
|
|
4142
|
+
properties._gridImageMetadata = 1;
|
|
4143
|
+
{
|
|
4144
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify(message.gridImageMetadata);
|
|
4145
|
+
if (error)
|
|
4146
|
+
return "gridImageMetadata." + error;
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
if (message.messageText != null && message.hasOwnProperty("messageText")) {
|
|
4150
|
+
properties._messageText = 1;
|
|
4151
|
+
if (!$util.isString(message.messageText))
|
|
4152
|
+
return "messageText: string expected";
|
|
4153
|
+
}
|
|
4154
|
+
if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) {
|
|
4155
|
+
properties._imageMetadata = 1;
|
|
4156
|
+
{
|
|
4157
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify(message.imageMetadata);
|
|
4158
|
+
if (error)
|
|
4159
|
+
return "imageMetadata." + error;
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4162
|
+
if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) {
|
|
4163
|
+
properties._codeMetadata = 1;
|
|
4164
|
+
{
|
|
4165
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.verify(message.codeMetadata);
|
|
4166
|
+
if (error)
|
|
4167
|
+
return "codeMetadata." + error;
|
|
4168
|
+
}
|
|
4169
|
+
}
|
|
4170
|
+
if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) {
|
|
4171
|
+
properties._tableMetadata = 1;
|
|
4172
|
+
{
|
|
4173
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.verify(message.tableMetadata);
|
|
4174
|
+
if (error)
|
|
4175
|
+
return "tableMetadata." + error;
|
|
4176
|
+
}
|
|
4177
|
+
}
|
|
4178
|
+
if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) {
|
|
4179
|
+
properties._dynamicMetadata = 1;
|
|
4180
|
+
{
|
|
4181
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify(message.dynamicMetadata);
|
|
4182
|
+
if (error)
|
|
4183
|
+
return "dynamicMetadata." + error;
|
|
4184
|
+
}
|
|
4185
|
+
}
|
|
4186
|
+
return null;
|
|
4187
|
+
};
|
|
4188
|
+
|
|
4189
|
+
/**
|
|
4190
|
+
* Creates a AIRichResponseSubMessage message from a plain object. Also converts values to their respective internal types.
|
|
4191
|
+
* @function fromObject
|
|
4192
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4193
|
+
* @static
|
|
4194
|
+
* @param {Object.<string,*>} object Plain object
|
|
4195
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage
|
|
4196
|
+
*/
|
|
4197
|
+
AIRichResponseSubMessage.fromObject = function fromObject(object) {
|
|
4198
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseSubMessage)
|
|
4199
|
+
return object;
|
|
4200
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseSubMessage();
|
|
4201
|
+
switch (object.messageType) {
|
|
4202
|
+
default:
|
|
4203
|
+
if (typeof object.messageType === "number") {
|
|
4204
|
+
message.messageType = object.messageType;
|
|
4205
|
+
break;
|
|
4206
|
+
}
|
|
4207
|
+
break;
|
|
4208
|
+
case "AI_RICH_RESPONSE_UNKNOWN":
|
|
4209
|
+
case 0:
|
|
4210
|
+
message.messageType = 0;
|
|
4211
|
+
break;
|
|
4212
|
+
case "AI_RICH_RESPONSE_GRID_IMAGE":
|
|
4213
|
+
case 1:
|
|
4214
|
+
message.messageType = 1;
|
|
4215
|
+
break;
|
|
4216
|
+
case "AI_RICH_RESPONSE_TEXT":
|
|
4217
|
+
case 2:
|
|
4218
|
+
message.messageType = 2;
|
|
4219
|
+
break;
|
|
4220
|
+
case "AI_RICH_RESPONSE_INLINE_IMAGE":
|
|
4221
|
+
case 3:
|
|
4222
|
+
message.messageType = 3;
|
|
4223
|
+
break;
|
|
4224
|
+
case "AI_RICH_RESPONSE_TABLE":
|
|
4225
|
+
case 4:
|
|
4226
|
+
message.messageType = 4;
|
|
4227
|
+
break;
|
|
4228
|
+
case "AI_RICH_RESPONSE_CODE":
|
|
4229
|
+
case 5:
|
|
4230
|
+
message.messageType = 5;
|
|
4231
|
+
break;
|
|
4232
|
+
case "AI_RICH_RESPONSE_DYNAMIC":
|
|
4233
|
+
case 6:
|
|
4234
|
+
message.messageType = 6;
|
|
4235
|
+
break;
|
|
4236
|
+
}
|
|
4237
|
+
if (object.gridImageMetadata != null) {
|
|
4238
|
+
if (typeof object.gridImageMetadata !== "object")
|
|
4239
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseSubMessage.gridImageMetadata: object expected");
|
|
4240
|
+
message.gridImageMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.fromObject(object.gridImageMetadata);
|
|
4241
|
+
}
|
|
4242
|
+
if (object.messageText != null)
|
|
4243
|
+
message.messageText = String(object.messageText);
|
|
4244
|
+
if (object.imageMetadata != null) {
|
|
4245
|
+
if (typeof object.imageMetadata !== "object")
|
|
4246
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseSubMessage.imageMetadata: object expected");
|
|
4247
|
+
message.imageMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.fromObject(object.imageMetadata);
|
|
4248
|
+
}
|
|
4249
|
+
if (object.codeMetadata != null) {
|
|
4250
|
+
if (typeof object.codeMetadata !== "object")
|
|
4251
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseSubMessage.codeMetadata: object expected");
|
|
4252
|
+
message.codeMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.fromObject(object.codeMetadata);
|
|
4253
|
+
}
|
|
4254
|
+
if (object.tableMetadata != null) {
|
|
4255
|
+
if (typeof object.tableMetadata !== "object")
|
|
4256
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseSubMessage.tableMetadata: object expected");
|
|
4257
|
+
message.tableMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.fromObject(object.tableMetadata);
|
|
4258
|
+
}
|
|
4259
|
+
if (object.dynamicMetadata != null) {
|
|
4260
|
+
if (typeof object.dynamicMetadata !== "object")
|
|
4261
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseSubMessage.dynamicMetadata: object expected");
|
|
4262
|
+
message.dynamicMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.fromObject(object.dynamicMetadata);
|
|
4263
|
+
}
|
|
4264
|
+
return message;
|
|
4265
|
+
};
|
|
4266
|
+
|
|
4267
|
+
/**
|
|
4268
|
+
* Creates a plain object from a AIRichResponseSubMessage message. Also converts values to other types if specified.
|
|
4269
|
+
* @function toObject
|
|
4270
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4271
|
+
* @static
|
|
4272
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseSubMessage} message AIRichResponseSubMessage
|
|
4273
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
4274
|
+
* @returns {Object.<string,*>} Plain object
|
|
4275
|
+
*/
|
|
4276
|
+
AIRichResponseSubMessage.toObject = function toObject(message, options) {
|
|
4277
|
+
if (!options)
|
|
4278
|
+
options = {};
|
|
4279
|
+
var object = {};
|
|
4280
|
+
if (message.messageType != null && message.hasOwnProperty("messageType")) {
|
|
4281
|
+
object.messageType = options.enums === String ? $root.waproto.AIRichResponseMessage.AIRichResponseSubMessageType[message.messageType] === undefined ? message.messageType : $root.waproto.AIRichResponseMessage.AIRichResponseSubMessageType[message.messageType] : message.messageType;
|
|
4282
|
+
if (options.oneofs)
|
|
4283
|
+
object._messageType = "messageType";
|
|
4284
|
+
}
|
|
4285
|
+
if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata")) {
|
|
4286
|
+
object.gridImageMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseGridImageMetadata.toObject(message.gridImageMetadata, options);
|
|
4287
|
+
if (options.oneofs)
|
|
4288
|
+
object._gridImageMetadata = "gridImageMetadata";
|
|
4289
|
+
}
|
|
4290
|
+
if (message.messageText != null && message.hasOwnProperty("messageText")) {
|
|
4291
|
+
object.messageText = message.messageText;
|
|
4292
|
+
if (options.oneofs)
|
|
4293
|
+
object._messageText = "messageText";
|
|
4294
|
+
}
|
|
4295
|
+
if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) {
|
|
4296
|
+
object.imageMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.toObject(message.imageMetadata, options);
|
|
4297
|
+
if (options.oneofs)
|
|
4298
|
+
object._imageMetadata = "imageMetadata";
|
|
4299
|
+
}
|
|
4300
|
+
if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) {
|
|
4301
|
+
object.codeMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseCodeMetadata.toObject(message.codeMetadata, options);
|
|
4302
|
+
if (options.oneofs)
|
|
4303
|
+
object._codeMetadata = "codeMetadata";
|
|
4304
|
+
}
|
|
4305
|
+
if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) {
|
|
4306
|
+
object.tableMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.toObject(message.tableMetadata, options);
|
|
4307
|
+
if (options.oneofs)
|
|
4308
|
+
object._tableMetadata = "tableMetadata";
|
|
4309
|
+
}
|
|
4310
|
+
if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) {
|
|
4311
|
+
object.dynamicMetadata = $root.waproto.AIRichResponseMessage.AIRichResponseDynamicMetadata.toObject(message.dynamicMetadata, options);
|
|
4312
|
+
if (options.oneofs)
|
|
4313
|
+
object._dynamicMetadata = "dynamicMetadata";
|
|
4314
|
+
}
|
|
4315
|
+
return object;
|
|
4316
|
+
};
|
|
4317
|
+
|
|
4318
|
+
/**
|
|
4319
|
+
* Converts this AIRichResponseSubMessage to JSON.
|
|
4320
|
+
* @function toJSON
|
|
4321
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4322
|
+
* @instance
|
|
4323
|
+
* @returns {Object.<string,*>} JSON object
|
|
4324
|
+
*/
|
|
4325
|
+
AIRichResponseSubMessage.prototype.toJSON = function toJSON() {
|
|
4326
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
4327
|
+
};
|
|
4328
|
+
|
|
4329
|
+
/**
|
|
4330
|
+
* Gets the default type url for AIRichResponseSubMessage
|
|
4331
|
+
* @function getTypeUrl
|
|
4332
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseSubMessage
|
|
4333
|
+
* @static
|
|
4334
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
4335
|
+
* @returns {string} The default type url
|
|
4336
|
+
*/
|
|
4337
|
+
AIRichResponseSubMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
4338
|
+
if (typeUrlPrefix === undefined) {
|
|
4339
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
4340
|
+
}
|
|
4341
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseSubMessage";
|
|
4342
|
+
};
|
|
4343
|
+
|
|
4344
|
+
return AIRichResponseSubMessage;
|
|
4345
|
+
})();
|
|
4346
|
+
|
|
4347
|
+
/**
|
|
4348
|
+
* AIRichResponseSubMessageType enum.
|
|
4349
|
+
* @name waproto.AIRichResponseMessage.AIRichResponseSubMessageType
|
|
4350
|
+
* @enum {number}
|
|
4351
|
+
* @property {number} AI_RICH_RESPONSE_UNKNOWN=0 AI_RICH_RESPONSE_UNKNOWN value
|
|
4352
|
+
* @property {number} AI_RICH_RESPONSE_GRID_IMAGE=1 AI_RICH_RESPONSE_GRID_IMAGE value
|
|
4353
|
+
* @property {number} AI_RICH_RESPONSE_TEXT=2 AI_RICH_RESPONSE_TEXT value
|
|
4354
|
+
* @property {number} AI_RICH_RESPONSE_INLINE_IMAGE=3 AI_RICH_RESPONSE_INLINE_IMAGE value
|
|
4355
|
+
* @property {number} AI_RICH_RESPONSE_TABLE=4 AI_RICH_RESPONSE_TABLE value
|
|
4356
|
+
* @property {number} AI_RICH_RESPONSE_CODE=5 AI_RICH_RESPONSE_CODE value
|
|
4357
|
+
* @property {number} AI_RICH_RESPONSE_DYNAMIC=6 AI_RICH_RESPONSE_DYNAMIC value
|
|
4358
|
+
*/
|
|
4359
|
+
AIRichResponseMessage.AIRichResponseSubMessageType = (function() {
|
|
4360
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
4361
|
+
values[valuesById[0] = "AI_RICH_RESPONSE_UNKNOWN"] = 0;
|
|
4362
|
+
values[valuesById[1] = "AI_RICH_RESPONSE_GRID_IMAGE"] = 1;
|
|
4363
|
+
values[valuesById[2] = "AI_RICH_RESPONSE_TEXT"] = 2;
|
|
4364
|
+
values[valuesById[3] = "AI_RICH_RESPONSE_INLINE_IMAGE"] = 3;
|
|
4365
|
+
values[valuesById[4] = "AI_RICH_RESPONSE_TABLE"] = 4;
|
|
4366
|
+
values[valuesById[5] = "AI_RICH_RESPONSE_CODE"] = 5;
|
|
4367
|
+
values[valuesById[6] = "AI_RICH_RESPONSE_DYNAMIC"] = 6;
|
|
4368
|
+
return values;
|
|
4369
|
+
})();
|
|
4370
|
+
|
|
4371
|
+
AIRichResponseMessage.AIRichResponseTableMetadata = (function() {
|
|
4372
|
+
|
|
4373
|
+
/**
|
|
4374
|
+
* Properties of a AIRichResponseTableMetadata.
|
|
4375
|
+
* @memberof waproto.AIRichResponseMessage
|
|
4376
|
+
* @interface IAIRichResponseTableMetadata
|
|
4377
|
+
* @property {Array.<waproto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow>|null} [rows] AIRichResponseTableMetadata rows
|
|
4378
|
+
*/
|
|
4379
|
+
|
|
4380
|
+
/**
|
|
4381
|
+
* Constructs a new AIRichResponseTableMetadata.
|
|
4382
|
+
* @memberof waproto.AIRichResponseMessage
|
|
4383
|
+
* @classdesc Represents a AIRichResponseTableMetadata.
|
|
4384
|
+
* @implements IAIRichResponseTableMetadata
|
|
4385
|
+
* @constructor
|
|
4386
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseTableMetadata=} [properties] Properties to set
|
|
4387
|
+
*/
|
|
4388
|
+
function AIRichResponseTableMetadata(properties) {
|
|
4389
|
+
this.rows = [];
|
|
4390
|
+
if (properties)
|
|
4391
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
4392
|
+
if (properties[keys[i]] != null)
|
|
4393
|
+
this[keys[i]] = properties[keys[i]];
|
|
4394
|
+
}
|
|
4395
|
+
|
|
4396
|
+
/**
|
|
4397
|
+
* AIRichResponseTableMetadata rows.
|
|
4398
|
+
* @member {Array.<waproto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow>} rows
|
|
4399
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4400
|
+
* @instance
|
|
4401
|
+
*/
|
|
4402
|
+
AIRichResponseTableMetadata.prototype.rows = $util.emptyArray;
|
|
4403
|
+
|
|
4404
|
+
/**
|
|
4405
|
+
* Creates a new AIRichResponseTableMetadata instance using the specified properties.
|
|
4406
|
+
* @function create
|
|
4407
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4408
|
+
* @static
|
|
4409
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseTableMetadata=} [properties] Properties to set
|
|
4410
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata instance
|
|
4411
|
+
*/
|
|
4412
|
+
AIRichResponseTableMetadata.create = function create(properties) {
|
|
4413
|
+
return new AIRichResponseTableMetadata(properties);
|
|
4414
|
+
};
|
|
4415
|
+
|
|
4416
|
+
/**
|
|
4417
|
+
* Encodes the specified AIRichResponseTableMetadata message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseTableMetadata.verify|verify} messages.
|
|
4418
|
+
* @function encode
|
|
4419
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4420
|
+
* @static
|
|
4421
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseTableMetadata} message AIRichResponseTableMetadata message or plain object to encode
|
|
4422
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4423
|
+
* @returns {$protobuf.Writer} Writer
|
|
4424
|
+
*/
|
|
4425
|
+
AIRichResponseTableMetadata.encode = function encode(message, writer) {
|
|
4426
|
+
if (!writer)
|
|
4427
|
+
writer = $Writer.create();
|
|
4428
|
+
if (message.rows != null && message.rows.length)
|
|
4429
|
+
for (var i = 0; i < message.rows.length; ++i)
|
|
4430
|
+
$root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
4431
|
+
return writer;
|
|
4432
|
+
};
|
|
4433
|
+
|
|
4434
|
+
/**
|
|
4435
|
+
* Encodes the specified AIRichResponseTableMetadata message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseTableMetadata.verify|verify} messages.
|
|
4436
|
+
* @function encodeDelimited
|
|
4437
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4438
|
+
* @static
|
|
4439
|
+
* @param {waproto.AIRichResponseMessage.IAIRichResponseTableMetadata} message AIRichResponseTableMetadata message or plain object to encode
|
|
4440
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4441
|
+
* @returns {$protobuf.Writer} Writer
|
|
4442
|
+
*/
|
|
4443
|
+
AIRichResponseTableMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
4444
|
+
return this.encode(message, writer).ldelim();
|
|
4445
|
+
};
|
|
4446
|
+
|
|
4447
|
+
/**
|
|
4448
|
+
* Decodes a AIRichResponseTableMetadata message from the specified reader or buffer.
|
|
4449
|
+
* @function decode
|
|
4450
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4451
|
+
* @static
|
|
4452
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4453
|
+
* @param {number} [length] Message length if known beforehand
|
|
4454
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata
|
|
4455
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4456
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4457
|
+
*/
|
|
4458
|
+
AIRichResponseTableMetadata.decode = function decode(reader, length) {
|
|
4459
|
+
if (!(reader instanceof $Reader))
|
|
4460
|
+
reader = $Reader.create(reader);
|
|
4461
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata();
|
|
4462
|
+
while (reader.pos < end) {
|
|
4463
|
+
var tag = reader.uint32();
|
|
4464
|
+
switch (tag >>> 3) {
|
|
4465
|
+
case 1: {
|
|
4466
|
+
if (!(message.rows && message.rows.length))
|
|
4467
|
+
message.rows = [];
|
|
4468
|
+
message.rows.push($root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.decode(reader, reader.uint32()));
|
|
4469
|
+
break;
|
|
4470
|
+
}
|
|
4471
|
+
default:
|
|
4472
|
+
reader.skipType(tag & 7);
|
|
4473
|
+
break;
|
|
4474
|
+
}
|
|
4475
|
+
}
|
|
4476
|
+
return message;
|
|
4477
|
+
};
|
|
4478
|
+
|
|
4479
|
+
/**
|
|
4480
|
+
* Decodes a AIRichResponseTableMetadata message from the specified reader or buffer, length delimited.
|
|
4481
|
+
* @function decodeDelimited
|
|
4482
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4483
|
+
* @static
|
|
4484
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4485
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata
|
|
4486
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4487
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4488
|
+
*/
|
|
4489
|
+
AIRichResponseTableMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
4490
|
+
if (!(reader instanceof $Reader))
|
|
4491
|
+
reader = new $Reader(reader);
|
|
4492
|
+
return this.decode(reader, reader.uint32());
|
|
4493
|
+
};
|
|
4494
|
+
|
|
4495
|
+
/**
|
|
4496
|
+
* Verifies a AIRichResponseTableMetadata message.
|
|
4497
|
+
* @function verify
|
|
4498
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4499
|
+
* @static
|
|
4500
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
4501
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
4502
|
+
*/
|
|
4503
|
+
AIRichResponseTableMetadata.verify = function verify(message) {
|
|
4504
|
+
if (typeof message !== "object" || message === null)
|
|
4505
|
+
return "object expected";
|
|
4506
|
+
if (message.rows != null && message.hasOwnProperty("rows")) {
|
|
4507
|
+
if (!Array.isArray(message.rows))
|
|
4508
|
+
return "rows: array expected";
|
|
4509
|
+
for (var i = 0; i < message.rows.length; ++i) {
|
|
4510
|
+
var error = $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify(message.rows[i]);
|
|
4511
|
+
if (error)
|
|
4512
|
+
return "rows." + error;
|
|
4513
|
+
}
|
|
4514
|
+
}
|
|
4515
|
+
return null;
|
|
4516
|
+
};
|
|
4517
|
+
|
|
4518
|
+
/**
|
|
4519
|
+
* Creates a AIRichResponseTableMetadata message from a plain object. Also converts values to their respective internal types.
|
|
4520
|
+
* @function fromObject
|
|
4521
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4522
|
+
* @static
|
|
4523
|
+
* @param {Object.<string,*>} object Plain object
|
|
4524
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata
|
|
4525
|
+
*/
|
|
4526
|
+
AIRichResponseTableMetadata.fromObject = function fromObject(object) {
|
|
4527
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata)
|
|
4528
|
+
return object;
|
|
4529
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata();
|
|
4530
|
+
if (object.rows) {
|
|
4531
|
+
if (!Array.isArray(object.rows))
|
|
4532
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseTableMetadata.rows: array expected");
|
|
4533
|
+
message.rows = [];
|
|
4534
|
+
for (var i = 0; i < object.rows.length; ++i) {
|
|
4535
|
+
if (typeof object.rows[i] !== "object")
|
|
4536
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseTableMetadata.rows: object expected");
|
|
4537
|
+
message.rows[i] = $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.fromObject(object.rows[i]);
|
|
4538
|
+
}
|
|
4539
|
+
}
|
|
4540
|
+
return message;
|
|
4541
|
+
};
|
|
4542
|
+
|
|
4543
|
+
/**
|
|
4544
|
+
* Creates a plain object from a AIRichResponseTableMetadata message. Also converts values to other types if specified.
|
|
4545
|
+
* @function toObject
|
|
4546
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4547
|
+
* @static
|
|
4548
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseTableMetadata} message AIRichResponseTableMetadata
|
|
4549
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
4550
|
+
* @returns {Object.<string,*>} Plain object
|
|
4551
|
+
*/
|
|
4552
|
+
AIRichResponseTableMetadata.toObject = function toObject(message, options) {
|
|
4553
|
+
if (!options)
|
|
4554
|
+
options = {};
|
|
4555
|
+
var object = {};
|
|
4556
|
+
if (options.arrays || options.defaults)
|
|
4557
|
+
object.rows = [];
|
|
4558
|
+
if (message.rows && message.rows.length) {
|
|
4559
|
+
object.rows = [];
|
|
4560
|
+
for (var j = 0; j < message.rows.length; ++j)
|
|
4561
|
+
object.rows[j] = $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.toObject(message.rows[j], options);
|
|
4562
|
+
}
|
|
4563
|
+
return object;
|
|
4564
|
+
};
|
|
4565
|
+
|
|
4566
|
+
/**
|
|
4567
|
+
* Converts this AIRichResponseTableMetadata to JSON.
|
|
4568
|
+
* @function toJSON
|
|
4569
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4570
|
+
* @instance
|
|
4571
|
+
* @returns {Object.<string,*>} JSON object
|
|
4572
|
+
*/
|
|
4573
|
+
AIRichResponseTableMetadata.prototype.toJSON = function toJSON() {
|
|
4574
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
4575
|
+
};
|
|
4576
|
+
|
|
4577
|
+
/**
|
|
4578
|
+
* Gets the default type url for AIRichResponseTableMetadata
|
|
4579
|
+
* @function getTypeUrl
|
|
4580
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4581
|
+
* @static
|
|
4582
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
4583
|
+
* @returns {string} The default type url
|
|
4584
|
+
*/
|
|
4585
|
+
AIRichResponseTableMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
4586
|
+
if (typeUrlPrefix === undefined) {
|
|
4587
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
4588
|
+
}
|
|
4589
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseTableMetadata";
|
|
4590
|
+
};
|
|
4591
|
+
|
|
4592
|
+
AIRichResponseTableMetadata.AIRichResponseTableRow = (function() {
|
|
4593
|
+
|
|
4594
|
+
/**
|
|
4595
|
+
* Properties of a AIRichResponseTableRow.
|
|
4596
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4597
|
+
* @interface IAIRichResponseTableRow
|
|
4598
|
+
* @property {Array.<string>|null} [items] AIRichResponseTableRow items
|
|
4599
|
+
* @property {boolean|null} [isHeading] AIRichResponseTableRow isHeading
|
|
4600
|
+
*/
|
|
4601
|
+
|
|
4602
|
+
/**
|
|
4603
|
+
* Constructs a new AIRichResponseTableRow.
|
|
4604
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata
|
|
4605
|
+
* @classdesc Represents a AIRichResponseTableRow.
|
|
4606
|
+
* @implements IAIRichResponseTableRow
|
|
4607
|
+
* @constructor
|
|
4608
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow=} [properties] Properties to set
|
|
4609
|
+
*/
|
|
4610
|
+
function AIRichResponseTableRow(properties) {
|
|
4611
|
+
this.items = [];
|
|
4612
|
+
if (properties)
|
|
4613
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
4614
|
+
if (properties[keys[i]] != null)
|
|
4615
|
+
this[keys[i]] = properties[keys[i]];
|
|
4616
|
+
}
|
|
4617
|
+
|
|
4618
|
+
/**
|
|
4619
|
+
* AIRichResponseTableRow items.
|
|
4620
|
+
* @member {Array.<string>} items
|
|
4621
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4622
|
+
* @instance
|
|
4623
|
+
*/
|
|
4624
|
+
AIRichResponseTableRow.prototype.items = $util.emptyArray;
|
|
4625
|
+
|
|
4626
|
+
/**
|
|
4627
|
+
* AIRichResponseTableRow isHeading.
|
|
4628
|
+
* @member {boolean|null|undefined} isHeading
|
|
4629
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4630
|
+
* @instance
|
|
4631
|
+
*/
|
|
4632
|
+
AIRichResponseTableRow.prototype.isHeading = null;
|
|
4633
|
+
|
|
4634
|
+
// OneOf field names bound to virtual getters and setters
|
|
4635
|
+
var $oneOfFields;
|
|
4636
|
+
|
|
4637
|
+
// Virtual OneOf for proto3 optional field
|
|
4638
|
+
Object.defineProperty(AIRichResponseTableRow.prototype, "_isHeading", {
|
|
4639
|
+
get: $util.oneOfGetter($oneOfFields = ["isHeading"]),
|
|
4640
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
4641
|
+
});
|
|
4642
|
+
|
|
4643
|
+
/**
|
|
4644
|
+
* Creates a new AIRichResponseTableRow instance using the specified properties.
|
|
4645
|
+
* @function create
|
|
4646
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4647
|
+
* @static
|
|
4648
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow=} [properties] Properties to set
|
|
4649
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow instance
|
|
4650
|
+
*/
|
|
4651
|
+
AIRichResponseTableRow.create = function create(properties) {
|
|
4652
|
+
return new AIRichResponseTableRow(properties);
|
|
4653
|
+
};
|
|
4654
|
+
|
|
4655
|
+
/**
|
|
4656
|
+
* Encodes the specified AIRichResponseTableRow message. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages.
|
|
4657
|
+
* @function encode
|
|
4658
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4659
|
+
* @static
|
|
4660
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow} message AIRichResponseTableRow message or plain object to encode
|
|
4661
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4662
|
+
* @returns {$protobuf.Writer} Writer
|
|
4663
|
+
*/
|
|
4664
|
+
AIRichResponseTableRow.encode = function encode(message, writer) {
|
|
4665
|
+
if (!writer)
|
|
4666
|
+
writer = $Writer.create();
|
|
4667
|
+
if (message.items != null && message.items.length)
|
|
4668
|
+
for (var i = 0; i < message.items.length; ++i)
|
|
4669
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]);
|
|
4670
|
+
if (message.isHeading != null && Object.hasOwnProperty.call(message, "isHeading"))
|
|
4671
|
+
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isHeading);
|
|
4672
|
+
return writer;
|
|
4673
|
+
};
|
|
4674
|
+
|
|
4675
|
+
/**
|
|
4676
|
+
* Encodes the specified AIRichResponseTableRow message, length delimited. Does not implicitly {@link waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages.
|
|
4677
|
+
* @function encodeDelimited
|
|
4678
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4679
|
+
* @static
|
|
4680
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow} message AIRichResponseTableRow message or plain object to encode
|
|
4681
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4682
|
+
* @returns {$protobuf.Writer} Writer
|
|
4683
|
+
*/
|
|
4684
|
+
AIRichResponseTableRow.encodeDelimited = function encodeDelimited(message, writer) {
|
|
4685
|
+
return this.encode(message, writer).ldelim();
|
|
4686
|
+
};
|
|
4687
|
+
|
|
4688
|
+
/**
|
|
4689
|
+
* Decodes a AIRichResponseTableRow message from the specified reader or buffer.
|
|
4690
|
+
* @function decode
|
|
4691
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4692
|
+
* @static
|
|
4693
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4694
|
+
* @param {number} [length] Message length if known beforehand
|
|
4695
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow
|
|
4696
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4697
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4698
|
+
*/
|
|
4699
|
+
AIRichResponseTableRow.decode = function decode(reader, length) {
|
|
4700
|
+
if (!(reader instanceof $Reader))
|
|
4701
|
+
reader = $Reader.create(reader);
|
|
4702
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow();
|
|
4703
|
+
while (reader.pos < end) {
|
|
4704
|
+
var tag = reader.uint32();
|
|
4705
|
+
switch (tag >>> 3) {
|
|
4706
|
+
case 1: {
|
|
4707
|
+
if (!(message.items && message.items.length))
|
|
4708
|
+
message.items = [];
|
|
4709
|
+
message.items.push(reader.string());
|
|
4710
|
+
break;
|
|
4711
|
+
}
|
|
4712
|
+
case 2: {
|
|
4713
|
+
message.isHeading = reader.bool();
|
|
4714
|
+
break;
|
|
4715
|
+
}
|
|
4716
|
+
default:
|
|
4717
|
+
reader.skipType(tag & 7);
|
|
4718
|
+
break;
|
|
4719
|
+
}
|
|
4720
|
+
}
|
|
4721
|
+
return message;
|
|
4722
|
+
};
|
|
4723
|
+
|
|
4724
|
+
/**
|
|
4725
|
+
* Decodes a AIRichResponseTableRow message from the specified reader or buffer, length delimited.
|
|
4726
|
+
* @function decodeDelimited
|
|
4727
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4728
|
+
* @static
|
|
4729
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4730
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow
|
|
4731
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4732
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4733
|
+
*/
|
|
4734
|
+
AIRichResponseTableRow.decodeDelimited = function decodeDelimited(reader) {
|
|
4735
|
+
if (!(reader instanceof $Reader))
|
|
4736
|
+
reader = new $Reader(reader);
|
|
4737
|
+
return this.decode(reader, reader.uint32());
|
|
4738
|
+
};
|
|
4739
|
+
|
|
4740
|
+
/**
|
|
4741
|
+
* Verifies a AIRichResponseTableRow message.
|
|
4742
|
+
* @function verify
|
|
4743
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4744
|
+
* @static
|
|
4745
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
4746
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
4747
|
+
*/
|
|
4748
|
+
AIRichResponseTableRow.verify = function verify(message) {
|
|
4749
|
+
if (typeof message !== "object" || message === null)
|
|
4750
|
+
return "object expected";
|
|
4751
|
+
var properties = {};
|
|
4752
|
+
if (message.items != null && message.hasOwnProperty("items")) {
|
|
4753
|
+
if (!Array.isArray(message.items))
|
|
4754
|
+
return "items: array expected";
|
|
4755
|
+
for (var i = 0; i < message.items.length; ++i)
|
|
4756
|
+
if (!$util.isString(message.items[i]))
|
|
4757
|
+
return "items: string[] expected";
|
|
4758
|
+
}
|
|
4759
|
+
if (message.isHeading != null && message.hasOwnProperty("isHeading")) {
|
|
4760
|
+
properties._isHeading = 1;
|
|
4761
|
+
if (typeof message.isHeading !== "boolean")
|
|
4762
|
+
return "isHeading: boolean expected";
|
|
4763
|
+
}
|
|
4764
|
+
return null;
|
|
4765
|
+
};
|
|
4766
|
+
|
|
4767
|
+
/**
|
|
4768
|
+
* Creates a AIRichResponseTableRow message from a plain object. Also converts values to their respective internal types.
|
|
4769
|
+
* @function fromObject
|
|
4770
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4771
|
+
* @static
|
|
4772
|
+
* @param {Object.<string,*>} object Plain object
|
|
4773
|
+
* @returns {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow
|
|
4774
|
+
*/
|
|
4775
|
+
AIRichResponseTableRow.fromObject = function fromObject(object) {
|
|
4776
|
+
if (object instanceof $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow)
|
|
4777
|
+
return object;
|
|
4778
|
+
var message = new $root.waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow();
|
|
4779
|
+
if (object.items) {
|
|
4780
|
+
if (!Array.isArray(object.items))
|
|
4781
|
+
throw TypeError(".waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.items: array expected");
|
|
4782
|
+
message.items = [];
|
|
4783
|
+
for (var i = 0; i < object.items.length; ++i)
|
|
4784
|
+
message.items[i] = String(object.items[i]);
|
|
4785
|
+
}
|
|
4786
|
+
if (object.isHeading != null)
|
|
4787
|
+
message.isHeading = Boolean(object.isHeading);
|
|
4788
|
+
return message;
|
|
4789
|
+
};
|
|
4790
|
+
|
|
4791
|
+
/**
|
|
4792
|
+
* Creates a plain object from a AIRichResponseTableRow message. Also converts values to other types if specified.
|
|
4793
|
+
* @function toObject
|
|
4794
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4795
|
+
* @static
|
|
4796
|
+
* @param {waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} message AIRichResponseTableRow
|
|
4797
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
4798
|
+
* @returns {Object.<string,*>} Plain object
|
|
4799
|
+
*/
|
|
4800
|
+
AIRichResponseTableRow.toObject = function toObject(message, options) {
|
|
4801
|
+
if (!options)
|
|
4802
|
+
options = {};
|
|
4803
|
+
var object = {};
|
|
4804
|
+
if (options.arrays || options.defaults)
|
|
4805
|
+
object.items = [];
|
|
4806
|
+
if (message.items && message.items.length) {
|
|
4807
|
+
object.items = [];
|
|
4808
|
+
for (var j = 0; j < message.items.length; ++j)
|
|
4809
|
+
object.items[j] = message.items[j];
|
|
4810
|
+
}
|
|
4811
|
+
if (message.isHeading != null && message.hasOwnProperty("isHeading")) {
|
|
4812
|
+
object.isHeading = message.isHeading;
|
|
4813
|
+
if (options.oneofs)
|
|
4814
|
+
object._isHeading = "isHeading";
|
|
4815
|
+
}
|
|
4816
|
+
return object;
|
|
4817
|
+
};
|
|
4818
|
+
|
|
4819
|
+
/**
|
|
4820
|
+
* Converts this AIRichResponseTableRow to JSON.
|
|
4821
|
+
* @function toJSON
|
|
4822
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4823
|
+
* @instance
|
|
4824
|
+
* @returns {Object.<string,*>} JSON object
|
|
4825
|
+
*/
|
|
4826
|
+
AIRichResponseTableRow.prototype.toJSON = function toJSON() {
|
|
4827
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
4828
|
+
};
|
|
4829
|
+
|
|
4830
|
+
/**
|
|
4831
|
+
* Gets the default type url for AIRichResponseTableRow
|
|
4832
|
+
* @function getTypeUrl
|
|
4833
|
+
* @memberof waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
|
|
4834
|
+
* @static
|
|
4835
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
4836
|
+
* @returns {string} The default type url
|
|
4837
|
+
*/
|
|
4838
|
+
AIRichResponseTableRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
4839
|
+
if (typeUrlPrefix === undefined) {
|
|
4840
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
4841
|
+
}
|
|
4842
|
+
return typeUrlPrefix + "/waproto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow";
|
|
4843
|
+
};
|
|
4844
|
+
|
|
4845
|
+
return AIRichResponseTableRow;
|
|
4846
|
+
})();
|
|
4847
|
+
|
|
4848
|
+
return AIRichResponseTableMetadata;
|
|
4849
|
+
})();
|
|
4850
|
+
|
|
4851
|
+
return AIRichResponseMessage;
|
|
4852
|
+
})();
|
|
4853
|
+
|
|
1748
4854
|
waproto.ActionLink = (function() {
|
|
1749
4855
|
|
|
1750
4856
|
/**
|
|
@@ -4327,6 +7433,8 @@ $root.waproto = (function() {
|
|
|
4327
7433
|
case 5:
|
|
4328
7434
|
case 6:
|
|
4329
7435
|
case 7:
|
|
7436
|
+
case 8:
|
|
7437
|
+
case 9:
|
|
4330
7438
|
case 10:
|
|
4331
7439
|
case 11:
|
|
4332
7440
|
case 12:
|
|
@@ -4395,6 +7503,14 @@ $root.waproto = (function() {
|
|
|
4395
7503
|
case 7:
|
|
4396
7504
|
message.capabilities[i] = 7;
|
|
4397
7505
|
break;
|
|
7506
|
+
case "RICH_RESPONSE_STRUCTURED_RESPONSE":
|
|
7507
|
+
case 8:
|
|
7508
|
+
message.capabilities[i] = 8;
|
|
7509
|
+
break;
|
|
7510
|
+
case "RICH_RESPONSE_INLINE_IMAGE":
|
|
7511
|
+
case 9:
|
|
7512
|
+
message.capabilities[i] = 9;
|
|
7513
|
+
break;
|
|
4398
7514
|
case "WA_IG_1P_PLUGIN_RANKING_CONTROL":
|
|
4399
7515
|
case 10:
|
|
4400
7516
|
message.capabilities[i] = 10;
|
|
@@ -4504,6 +7620,8 @@ $root.waproto = (function() {
|
|
|
4504
7620
|
* @property {number} RICH_RESPONSE_THREAD_SURFING=5 RICH_RESPONSE_THREAD_SURFING value
|
|
4505
7621
|
* @property {number} RICH_RESPONSE_TABLE=6 RICH_RESPONSE_TABLE value
|
|
4506
7622
|
* @property {number} RICH_RESPONSE_CODE=7 RICH_RESPONSE_CODE value
|
|
7623
|
+
* @property {number} RICH_RESPONSE_STRUCTURED_RESPONSE=8 RICH_RESPONSE_STRUCTURED_RESPONSE value
|
|
7624
|
+
* @property {number} RICH_RESPONSE_INLINE_IMAGE=9 RICH_RESPONSE_INLINE_IMAGE value
|
|
4507
7625
|
* @property {number} WA_IG_1P_PLUGIN_RANKING_CONTROL=10 WA_IG_1P_PLUGIN_RANKING_CONTROL value
|
|
4508
7626
|
* @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_1=11 WA_IG_1P_PLUGIN_RANKING_UPDATE_1 value
|
|
4509
7627
|
* @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_2=12 WA_IG_1P_PLUGIN_RANKING_UPDATE_2 value
|
|
@@ -4525,6 +7643,8 @@ $root.waproto = (function() {
|
|
|
4525
7643
|
values[valuesById[5] = "RICH_RESPONSE_THREAD_SURFING"] = 5;
|
|
4526
7644
|
values[valuesById[6] = "RICH_RESPONSE_TABLE"] = 6;
|
|
4527
7645
|
values[valuesById[7] = "RICH_RESPONSE_CODE"] = 7;
|
|
7646
|
+
values[valuesById[8] = "RICH_RESPONSE_STRUCTURED_RESPONSE"] = 8;
|
|
7647
|
+
values[valuesById[9] = "RICH_RESPONSE_INLINE_IMAGE"] = 9;
|
|
4528
7648
|
values[valuesById[10] = "WA_IG_1P_PLUGIN_RANKING_CONTROL"] = 10;
|
|
4529
7649
|
values[valuesById[11] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_1"] = 11;
|
|
4530
7650
|
values[valuesById[12] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_2"] = 12;
|
|
@@ -43296,6 +46416,7 @@ $root.waproto = (function() {
|
|
|
43296
46416
|
* @property {waproto.Message.IFutureProofMessage|null} [pollCreationMessageV5] Message pollCreationMessageV5
|
|
43297
46417
|
* @property {waproto.Message.IFutureProofMessage|null} [statusAddYours] Message statusAddYours
|
|
43298
46418
|
* @property {waproto.Message.IFutureProofMessage|null} [groupStatusMessage] Message groupStatusMessage
|
|
46419
|
+
* @property {waproto.IAIRichResponseMessage|null} [richResponseMessage] Message richResponseMessage
|
|
43299
46420
|
*/
|
|
43300
46421
|
|
|
43301
46422
|
/**
|
|
@@ -43953,6 +47074,14 @@ $root.waproto = (function() {
|
|
|
43953
47074
|
*/
|
|
43954
47075
|
Message.prototype.groupStatusMessage = null;
|
|
43955
47076
|
|
|
47077
|
+
/**
|
|
47078
|
+
* Message richResponseMessage.
|
|
47079
|
+
* @member {waproto.IAIRichResponseMessage|null|undefined} richResponseMessage
|
|
47080
|
+
* @memberof waproto.Message
|
|
47081
|
+
* @instance
|
|
47082
|
+
*/
|
|
47083
|
+
Message.prototype.richResponseMessage = null;
|
|
47084
|
+
|
|
43956
47085
|
// OneOf field names bound to virtual getters and setters
|
|
43957
47086
|
var $oneOfFields;
|
|
43958
47087
|
|
|
@@ -44436,6 +47565,12 @@ $root.waproto = (function() {
|
|
|
44436
47565
|
set: $util.oneOfSetter($oneOfFields)
|
|
44437
47566
|
});
|
|
44438
47567
|
|
|
47568
|
+
// Virtual OneOf for proto3 optional field
|
|
47569
|
+
Object.defineProperty(Message.prototype, "_richResponseMessage", {
|
|
47570
|
+
get: $util.oneOfGetter($oneOfFields = ["richResponseMessage"]),
|
|
47571
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
47572
|
+
});
|
|
47573
|
+
|
|
44439
47574
|
/**
|
|
44440
47575
|
* Creates a new Message instance using the specified properties.
|
|
44441
47576
|
* @function create
|
|
@@ -44620,6 +47755,8 @@ $root.waproto = (function() {
|
|
|
44620
47755
|
$root.waproto.Message.FutureProofMessage.encode(message.statusAddYours, writer.uint32(/* id 95, wireType 2 =*/762).fork()).ldelim();
|
|
44621
47756
|
if (message.groupStatusMessage != null && Object.hasOwnProperty.call(message, "groupStatusMessage"))
|
|
44622
47757
|
$root.waproto.Message.FutureProofMessage.encode(message.groupStatusMessage, writer.uint32(/* id 96, wireType 2 =*/770).fork()).ldelim();
|
|
47758
|
+
if (message.richResponseMessage != null && Object.hasOwnProperty.call(message, "richResponseMessage"))
|
|
47759
|
+
$root.waproto.AIRichResponseMessage.encode(message.richResponseMessage, writer.uint32(/* id 97, wireType 2 =*/778).fork()).ldelim();
|
|
44623
47760
|
return writer;
|
|
44624
47761
|
};
|
|
44625
47762
|
|
|
@@ -44974,6 +48111,10 @@ $root.waproto = (function() {
|
|
|
44974
48111
|
message.groupStatusMessage = $root.waproto.Message.FutureProofMessage.decode(reader, reader.uint32());
|
|
44975
48112
|
break;
|
|
44976
48113
|
}
|
|
48114
|
+
case 97: {
|
|
48115
|
+
message.richResponseMessage = $root.waproto.AIRichResponseMessage.decode(reader, reader.uint32());
|
|
48116
|
+
break;
|
|
48117
|
+
}
|
|
44977
48118
|
default:
|
|
44978
48119
|
reader.skipType(tag & 7);
|
|
44979
48120
|
break;
|
|
@@ -45647,6 +48788,14 @@ $root.waproto = (function() {
|
|
|
45647
48788
|
return "groupStatusMessage." + error;
|
|
45648
48789
|
}
|
|
45649
48790
|
}
|
|
48791
|
+
if (message.richResponseMessage != null && message.hasOwnProperty("richResponseMessage")) {
|
|
48792
|
+
properties._richResponseMessage = 1;
|
|
48793
|
+
{
|
|
48794
|
+
var error = $root.waproto.AIRichResponseMessage.verify(message.richResponseMessage);
|
|
48795
|
+
if (error)
|
|
48796
|
+
return "richResponseMessage." + error;
|
|
48797
|
+
}
|
|
48798
|
+
}
|
|
45650
48799
|
return null;
|
|
45651
48800
|
};
|
|
45652
48801
|
|
|
@@ -46059,6 +49208,11 @@ $root.waproto = (function() {
|
|
|
46059
49208
|
throw TypeError(".waproto.Message.groupStatusMessage: object expected");
|
|
46060
49209
|
message.groupStatusMessage = $root.waproto.Message.FutureProofMessage.fromObject(object.groupStatusMessage);
|
|
46061
49210
|
}
|
|
49211
|
+
if (object.richResponseMessage != null) {
|
|
49212
|
+
if (typeof object.richResponseMessage !== "object")
|
|
49213
|
+
throw TypeError(".waproto.Message.richResponseMessage: object expected");
|
|
49214
|
+
message.richResponseMessage = $root.waproto.AIRichResponseMessage.fromObject(object.richResponseMessage);
|
|
49215
|
+
}
|
|
46062
49216
|
return message;
|
|
46063
49217
|
};
|
|
46064
49218
|
|
|
@@ -46475,6 +49629,11 @@ $root.waproto = (function() {
|
|
|
46475
49629
|
if (options.oneofs)
|
|
46476
49630
|
object._groupStatusMessage = "groupStatusMessage";
|
|
46477
49631
|
}
|
|
49632
|
+
if (message.richResponseMessage != null && message.hasOwnProperty("richResponseMessage")) {
|
|
49633
|
+
object.richResponseMessage = $root.waproto.AIRichResponseMessage.toObject(message.richResponseMessage, options);
|
|
49634
|
+
if (options.oneofs)
|
|
49635
|
+
object._richResponseMessage = "richResponseMessage";
|
|
49636
|
+
}
|
|
46478
49637
|
return object;
|
|
46479
49638
|
};
|
|
46480
49639
|
|
|
@@ -98379,6 +101538,7 @@ $root.waproto = (function() {
|
|
|
98379
101538
|
* @memberof waproto.MsgOpaqueData
|
|
98380
101539
|
* @interface IPollOption
|
|
98381
101540
|
* @property {string|null} [name] PollOption name
|
|
101541
|
+
* @property {string|null} [hash] PollOption hash
|
|
98382
101542
|
*/
|
|
98383
101543
|
|
|
98384
101544
|
/**
|
|
@@ -98404,6 +101564,14 @@ $root.waproto = (function() {
|
|
|
98404
101564
|
*/
|
|
98405
101565
|
PollOption.prototype.name = null;
|
|
98406
101566
|
|
|
101567
|
+
/**
|
|
101568
|
+
* PollOption hash.
|
|
101569
|
+
* @member {string|null|undefined} hash
|
|
101570
|
+
* @memberof waproto.MsgOpaqueData.PollOption
|
|
101571
|
+
* @instance
|
|
101572
|
+
*/
|
|
101573
|
+
PollOption.prototype.hash = null;
|
|
101574
|
+
|
|
98407
101575
|
// OneOf field names bound to virtual getters and setters
|
|
98408
101576
|
var $oneOfFields;
|
|
98409
101577
|
|
|
@@ -98413,6 +101581,12 @@ $root.waproto = (function() {
|
|
|
98413
101581
|
set: $util.oneOfSetter($oneOfFields)
|
|
98414
101582
|
});
|
|
98415
101583
|
|
|
101584
|
+
// Virtual OneOf for proto3 optional field
|
|
101585
|
+
Object.defineProperty(PollOption.prototype, "_hash", {
|
|
101586
|
+
get: $util.oneOfGetter($oneOfFields = ["hash"]),
|
|
101587
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
101588
|
+
});
|
|
101589
|
+
|
|
98416
101590
|
/**
|
|
98417
101591
|
* Creates a new PollOption instance using the specified properties.
|
|
98418
101592
|
* @function create
|
|
@@ -98439,6 +101613,8 @@ $root.waproto = (function() {
|
|
|
98439
101613
|
writer = $Writer.create();
|
|
98440
101614
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
98441
101615
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
101616
|
+
if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
|
|
101617
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.hash);
|
|
98442
101618
|
return writer;
|
|
98443
101619
|
};
|
|
98444
101620
|
|
|
@@ -98477,6 +101653,10 @@ $root.waproto = (function() {
|
|
|
98477
101653
|
message.name = reader.string();
|
|
98478
101654
|
break;
|
|
98479
101655
|
}
|
|
101656
|
+
case 2: {
|
|
101657
|
+
message.hash = reader.string();
|
|
101658
|
+
break;
|
|
101659
|
+
}
|
|
98480
101660
|
default:
|
|
98481
101661
|
reader.skipType(tag & 7);
|
|
98482
101662
|
break;
|
|
@@ -98518,6 +101698,11 @@ $root.waproto = (function() {
|
|
|
98518
101698
|
if (!$util.isString(message.name))
|
|
98519
101699
|
return "name: string expected";
|
|
98520
101700
|
}
|
|
101701
|
+
if (message.hash != null && message.hasOwnProperty("hash")) {
|
|
101702
|
+
properties._hash = 1;
|
|
101703
|
+
if (!$util.isString(message.hash))
|
|
101704
|
+
return "hash: string expected";
|
|
101705
|
+
}
|
|
98521
101706
|
return null;
|
|
98522
101707
|
};
|
|
98523
101708
|
|
|
@@ -98535,6 +101720,8 @@ $root.waproto = (function() {
|
|
|
98535
101720
|
var message = new $root.waproto.MsgOpaqueData.PollOption();
|
|
98536
101721
|
if (object.name != null)
|
|
98537
101722
|
message.name = String(object.name);
|
|
101723
|
+
if (object.hash != null)
|
|
101724
|
+
message.hash = String(object.hash);
|
|
98538
101725
|
return message;
|
|
98539
101726
|
};
|
|
98540
101727
|
|
|
@@ -98556,6 +101743,11 @@ $root.waproto = (function() {
|
|
|
98556
101743
|
if (options.oneofs)
|
|
98557
101744
|
object._name = "name";
|
|
98558
101745
|
}
|
|
101746
|
+
if (message.hash != null && message.hasOwnProperty("hash")) {
|
|
101747
|
+
object.hash = message.hash;
|
|
101748
|
+
if (options.oneofs)
|
|
101749
|
+
object._hash = "hash";
|
|
101750
|
+
}
|
|
98559
101751
|
return object;
|
|
98560
101752
|
};
|
|
98561
101753
|
|