scanoss 0.2.18 → 0.2.21

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.
Files changed (154) hide show
  1. package/build/main/bin/cli-bin.js +4 -2
  2. package/build/main/commands/dep.js +19 -7
  3. package/build/main/commands/helpers.d.ts +1 -0
  4. package/build/main/commands/helpers.js +22 -0
  5. package/build/main/commands/scan.js +3 -15
  6. package/build/main/index.d.ts +2 -1
  7. package/build/main/index.js +3 -2
  8. package/build/main/lib/dependencies/DependencyScanner.d.ts +10 -0
  9. package/build/main/lib/dependencies/DependencyScanner.js +66 -0
  10. package/build/main/lib/dependencies/DependencyScannerCfg.d.ts +4 -0
  11. package/build/main/lib/dependencies/DependencyScannerCfg.js +11 -0
  12. package/build/main/lib/dependencies/DependencyTypes.d.ts +10 -8
  13. package/build/main/lib/dependencies/LocalDependency/DependencyTypes.d.ts +16 -0
  14. package/build/main/lib/dependencies/LocalDependency/DependencyTypes.js +3 -0
  15. package/build/main/lib/dependencies/LocalDependency/LocalDependency.d.ts +6 -0
  16. package/build/main/lib/dependencies/LocalDependency/LocalDependency.js +51 -0
  17. package/build/main/lib/dependencies/LocalDependency/parsers/golangParser.d.ts +2 -0
  18. package/build/main/lib/dependencies/LocalDependency/parsers/golangParser.js +63 -0
  19. package/build/main/lib/dependencies/LocalDependency/parsers/mavenParser.d.ts +2 -0
  20. package/build/main/lib/dependencies/LocalDependency/parsers/mavenParser.js +57 -0
  21. package/build/main/lib/dependencies/{parsers → LocalDependency/parsers}/npmParser.d.ts +3 -3
  22. package/build/main/lib/dependencies/LocalDependency/parsers/npmParser.js +50 -0
  23. package/build/main/lib/dependencies/LocalDependency/parsers/pyParser.d.ts +2 -0
  24. package/build/main/lib/dependencies/LocalDependency/parsers/pyParser.js +61 -0
  25. package/build/main/lib/dependencies/{parsers → LocalDependency/parsers}/rubyParser.d.ts +3 -3
  26. package/build/main/lib/dependencies/LocalDependency/parsers/rubyParser.js +133 -0
  27. package/build/main/lib/dependencies/{parsers → LocalDependency/parsers}/utils.d.ts +0 -0
  28. package/build/main/lib/dependencies/{parsers → LocalDependency/parsers}/utils.js +1 -1
  29. package/build/main/lib/grpc/GrpcDependencyService.d.ts +11 -0
  30. package/build/main/lib/grpc/GrpcDependencyService.js +88 -0
  31. package/build/main/lib/{dependencies/parsers/golangParser.d.ts → grpc/scanoss/api/common/v2/scanoss-common_grpc_pb.d.ts} +0 -0
  32. package/build/main/lib/grpc/scanoss/api/common/v2/scanoss-common_grpc_pb.js +2 -0
  33. package/build/main/lib/grpc/scanoss/api/common/v2/scanoss-common_pb.d.ts +1 -0
  34. package/build/main/lib/grpc/scanoss/api/common/v2/scanoss-common_pb.js +404 -0
  35. package/build/main/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_grpc_pb.d.ts +42 -0
  36. package/build/main/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_grpc_pb.js +98 -0
  37. package/build/main/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_pb.d.ts +1 -0
  38. package/build/main/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_pb.js +1197 -0
  39. package/build/main/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_grpc_pb.d.ts +21 -0
  40. package/build/main/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_grpc_pb.js +66 -0
  41. package/build/main/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_pb.d.ts +1 -0
  42. package/build/main/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_pb.js +14 -0
  43. package/build/main/lib/scanner/Scanner.js +1 -1
  44. package/build/module/bin/cli-bin.js +4 -2
  45. package/build/module/commands/dep.js +19 -7
  46. package/build/module/commands/helpers.d.ts +1 -0
  47. package/build/module/commands/helpers.js +15 -0
  48. package/build/module/commands/scan.js +2 -14
  49. package/build/module/index.d.ts +2 -1
  50. package/build/module/index.js +3 -2
  51. package/build/module/lib/dependencies/DependencyScanner.d.ts +10 -0
  52. package/build/module/lib/dependencies/DependencyScanner.js +64 -0
  53. package/build/module/lib/dependencies/DependencyScannerCfg.d.ts +4 -0
  54. package/build/module/lib/dependencies/DependencyScannerCfg.js +5 -0
  55. package/build/module/lib/dependencies/DependencyTypes.d.ts +10 -8
  56. package/build/module/lib/dependencies/LocalDependency/DependencyTypes.d.ts +16 -0
  57. package/build/module/lib/dependencies/LocalDependency/DependencyTypes.js +2 -0
  58. package/build/module/lib/dependencies/LocalDependency/LocalDependency.d.ts +6 -0
  59. package/build/module/lib/dependencies/LocalDependency/LocalDependency.js +45 -0
  60. package/build/module/lib/dependencies/LocalDependency/parsers/golangParser.d.ts +2 -0
  61. package/build/module/lib/dependencies/LocalDependency/parsers/golangParser.js +55 -0
  62. package/build/module/lib/dependencies/LocalDependency/parsers/mavenParser.d.ts +2 -0
  63. package/build/module/lib/dependencies/LocalDependency/parsers/mavenParser.js +50 -0
  64. package/build/module/lib/dependencies/{parsers → LocalDependency/parsers}/npmParser.d.ts +3 -3
  65. package/build/module/lib/dependencies/LocalDependency/parsers/npmParser.js +42 -0
  66. package/build/module/lib/dependencies/LocalDependency/parsers/pyParser.d.ts +2 -0
  67. package/build/module/lib/dependencies/LocalDependency/parsers/pyParser.js +53 -0
  68. package/build/module/lib/dependencies/{parsers → LocalDependency/parsers}/rubyParser.d.ts +3 -3
  69. package/build/module/lib/dependencies/LocalDependency/parsers/rubyParser.js +130 -0
  70. package/build/module/lib/dependencies/{parsers → LocalDependency/parsers}/utils.d.ts +0 -0
  71. package/build/module/lib/dependencies/LocalDependency/parsers/utils.js +15 -0
  72. package/build/module/lib/grpc/GrpcDependencyService.d.ts +11 -0
  73. package/build/module/lib/grpc/GrpcDependencyService.js +67 -0
  74. package/build/module/lib/{dependencies/parsers/golangParser.d.ts → grpc/scanoss/api/common/v2/scanoss-common_grpc_pb.d.ts} +0 -0
  75. package/build/module/lib/grpc/scanoss/api/common/v2/scanoss-common_grpc_pb.js +2 -0
  76. package/build/module/lib/grpc/scanoss/api/common/v2/scanoss-common_pb.d.ts +1 -0
  77. package/build/module/lib/grpc/scanoss/api/common/v2/scanoss-common_pb.js +404 -0
  78. package/build/module/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_grpc_pb.d.ts +42 -0
  79. package/build/module/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_grpc_pb.js +98 -0
  80. package/build/module/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_pb.d.ts +1 -0
  81. package/build/module/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_pb.js +1197 -0
  82. package/build/module/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_grpc_pb.d.ts +21 -0
  83. package/build/module/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_grpc_pb.js +66 -0
  84. package/build/module/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_pb.d.ts +1 -0
  85. package/build/module/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_pb.js +14 -0
  86. package/build/module/lib/scanner/Scanner.js +1 -1
  87. package/build/tsconfig.module.tsbuildinfo +1 -1
  88. package/build/tsconfig.tsbuildinfo +1 -1
  89. package/package.json +3 -1
  90. package/src/bin/cli-bin.ts +4 -1
  91. package/src/commands/dep.ts +18 -6
  92. package/src/commands/helpers.ts +14 -0
  93. package/src/commands/scan.ts +3 -12
  94. package/src/index.ts +5 -1
  95. package/src/lib/dependencies/DependencyScanner.ts +77 -0
  96. package/src/lib/dependencies/DependencyScannerCfg.ts +7 -0
  97. package/src/lib/dependencies/DependencyTypes.ts +16 -14
  98. package/src/lib/dependencies/LocalDependency/DependencyTypes.ts +21 -0
  99. package/src/lib/dependencies/LocalDependency/LocalDependency.ts +48 -0
  100. package/src/lib/dependencies/LocalDependency/parsers/golangParser.ts +78 -0
  101. package/src/lib/dependencies/{parsers → LocalDependency/parsers}/mavenParser.ts +10 -6
  102. package/src/lib/dependencies/{parsers → LocalDependency/parsers}/npmParser.ts +14 -8
  103. package/src/lib/dependencies/LocalDependency/parsers/pyParser.ts +55 -0
  104. package/src/lib/dependencies/{parsers → LocalDependency/parsers}/rubyParser.ts +21 -29
  105. package/src/lib/dependencies/{parsers → LocalDependency/parsers}/utils.ts +0 -1
  106. package/src/lib/grpc/GrpcDependencyService.ts +73 -0
  107. package/src/lib/grpc/scanoss/api/common/v2/scanoss-common_grpc_pb.d.ts +1 -0
  108. package/src/lib/grpc/scanoss/api/common/v2/scanoss-common_grpc_pb.js +1 -0
  109. package/src/lib/grpc/scanoss/api/common/v2/scanoss-common_pb.d.ts +79 -0
  110. package/src/lib/grpc/scanoss/api/common/v2/scanoss-common_pb.js +482 -0
  111. package/src/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_grpc_pb.d.ts +30 -0
  112. package/src/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_grpc_pb.js +109 -0
  113. package/src/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_pb.d.ts +206 -0
  114. package/src/lib/grpc/scanoss/api/dependencies/v2/scanoss-dependencies_pb.js +1489 -0
  115. package/src/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_grpc_pb.d.ts +25 -0
  116. package/src/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_grpc_pb.js +73 -0
  117. package/src/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_pb.d.ts +6 -0
  118. package/src/lib/grpc/scanoss/api/scanning/v2/scanoss-scanning_pb.js +15 -0
  119. package/src/lib/scanner/Scanner.ts +2 -1
  120. package/tsconfig.json +5 -22
  121. package/yarn.lock +5252 -5213
  122. package/build/main/lib/dependencies/Dependency.d.ts +0 -9
  123. package/build/main/lib/dependencies/Dependency.js +0 -52
  124. package/build/main/lib/dependencies/PurlGenerator.d.ts +0 -2
  125. package/build/main/lib/dependencies/PurlGenerator.js +0 -44
  126. package/build/main/lib/dependencies/parsers/golangParser.js +0 -3
  127. package/build/main/lib/dependencies/parsers/mavenParser.d.ts +0 -2
  128. package/build/main/lib/dependencies/parsers/mavenParser.js +0 -54
  129. package/build/main/lib/dependencies/parsers/npmParser.js +0 -46
  130. package/build/main/lib/dependencies/parsers/pyParser.d.ts +0 -2
  131. package/build/main/lib/dependencies/parsers/pyParser.js +0 -51
  132. package/build/main/lib/dependencies/parsers/rubyParser.js +0 -135
  133. package/build/main/lib/dependencies/parsers/types.d.ts +0 -15
  134. package/build/main/lib/dependencies/parsers/types.js +0 -33
  135. package/build/module/lib/dependencies/Dependency.d.ts +0 -9
  136. package/build/module/lib/dependencies/Dependency.js +0 -47
  137. package/build/module/lib/dependencies/PurlGenerator.d.ts +0 -2
  138. package/build/module/lib/dependencies/PurlGenerator.js +0 -37
  139. package/build/module/lib/dependencies/parsers/golangParser.js +0 -3
  140. package/build/module/lib/dependencies/parsers/mavenParser.d.ts +0 -2
  141. package/build/module/lib/dependencies/parsers/mavenParser.js +0 -47
  142. package/build/module/lib/dependencies/parsers/npmParser.js +0 -38
  143. package/build/module/lib/dependencies/parsers/pyParser.d.ts +0 -2
  144. package/build/module/lib/dependencies/parsers/pyParser.js +0 -44
  145. package/build/module/lib/dependencies/parsers/rubyParser.js +0 -132
  146. package/build/module/lib/dependencies/parsers/types.d.ts +0 -15
  147. package/build/module/lib/dependencies/parsers/types.js +0 -32
  148. package/build/module/lib/dependencies/parsers/utils.js +0 -15
  149. package/package-lock.json +0 -18589
  150. package/src/lib/dependencies/Dependency.ts +0 -60
  151. package/src/lib/dependencies/PurlGenerator.ts +0 -44
  152. package/src/lib/dependencies/parsers/golangParser.ts +0 -4
  153. package/src/lib/dependencies/parsers/pyParser.ts +0 -46
  154. package/src/lib/dependencies/parsers/types.ts +0 -50
@@ -0,0 +1,1489 @@
1
+ /**
2
+ * @fileoverview
3
+ * @enhanceable
4
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
5
+ * field starts with 'MSG_' and isn't a translatable message.
6
+ * @public
7
+ */
8
+ // GENERATED CODE -- DO NOT EDIT!
9
+
10
+ var jspb = require('google-protobuf');
11
+ var goog = jspb;
12
+ var global = Function('return this')();
13
+
14
+ var scanoss_api_common_v2_scanoss$common_pb = require('../../../../scanoss/api/common/v2/scanoss-common_pb.js');
15
+ goog.exportSymbol('proto.scanoss.api.dependencies.v2.DependencyRequest', null, global);
16
+ goog.exportSymbol('proto.scanoss.api.dependencies.v2.DependencyRequest.Files', null, global);
17
+ goog.exportSymbol('proto.scanoss.api.dependencies.v2.DependencyRequest.Purls', null, global);
18
+ goog.exportSymbol('proto.scanoss.api.dependencies.v2.DependencyResponse', null, global);
19
+ goog.exportSymbol('proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies', null, global);
20
+ goog.exportSymbol('proto.scanoss.api.dependencies.v2.DependencyResponse.Files', null, global);
21
+ goog.exportSymbol('proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses', null, global);
22
+
23
+ /**
24
+ * Generated by JsPbCodeGenerator.
25
+ * @param {Array=} opt_data Optional initial data array, typically from a
26
+ * server response, or constructed directly in Javascript. The array is used
27
+ * in place and becomes part of the constructed object. It is not cloned.
28
+ * If no data is provided, the constructed object will be empty, but still
29
+ * valid.
30
+ * @extends {jspb.Message}
31
+ * @constructor
32
+ */
33
+ proto.scanoss.api.dependencies.v2.DependencyRequest = function(opt_data) {
34
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.scanoss.api.dependencies.v2.DependencyRequest.repeatedFields_, null);
35
+ };
36
+ goog.inherits(proto.scanoss.api.dependencies.v2.DependencyRequest, jspb.Message);
37
+ if (goog.DEBUG && !COMPILED) {
38
+ proto.scanoss.api.dependencies.v2.DependencyRequest.displayName = 'proto.scanoss.api.dependencies.v2.DependencyRequest';
39
+ }
40
+ /**
41
+ * List of repeated fields within this message type.
42
+ * @private {!Array<number>}
43
+ * @const
44
+ */
45
+ proto.scanoss.api.dependencies.v2.DependencyRequest.repeatedFields_ = [1];
46
+
47
+
48
+
49
+ if (jspb.Message.GENERATE_TO_OBJECT) {
50
+ /**
51
+ * Creates an object representation of this proto suitable for use in Soy templates.
52
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
53
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
54
+ * For the list of reserved names please see:
55
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
56
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
57
+ * for transitional soy proto support: http://goto/soy-param-migration
58
+ * @return {!Object}
59
+ */
60
+ proto.scanoss.api.dependencies.v2.DependencyRequest.prototype.toObject = function(opt_includeInstance) {
61
+ return proto.scanoss.api.dependencies.v2.DependencyRequest.toObject(opt_includeInstance, this);
62
+ };
63
+
64
+
65
+ /**
66
+ * Static version of the {@see toObject} method.
67
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
68
+ * instance for transitional soy proto support:
69
+ * http://goto/soy-param-migration
70
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest} msg The msg instance to transform.
71
+ * @return {!Object}
72
+ * @suppress {unusedLocalVariables} f is only used for nested messages
73
+ */
74
+ proto.scanoss.api.dependencies.v2.DependencyRequest.toObject = function(includeInstance, msg) {
75
+ var f, obj = {
76
+ filesList: jspb.Message.toObjectList(msg.getFilesList(),
77
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.toObject, includeInstance),
78
+ depth: jspb.Message.getFieldWithDefault(msg, 2, 0)
79
+ };
80
+
81
+ if (includeInstance) {
82
+ obj.$jspbMessageInstance = msg;
83
+ }
84
+ return obj;
85
+ };
86
+ }
87
+
88
+
89
+ /**
90
+ * Deserializes binary data (in protobuf wire format).
91
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
92
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyRequest}
93
+ */
94
+ proto.scanoss.api.dependencies.v2.DependencyRequest.deserializeBinary = function(bytes) {
95
+ var reader = new jspb.BinaryReader(bytes);
96
+ var msg = new proto.scanoss.api.dependencies.v2.DependencyRequest;
97
+ return proto.scanoss.api.dependencies.v2.DependencyRequest.deserializeBinaryFromReader(msg, reader);
98
+ };
99
+
100
+
101
+ /**
102
+ * Deserializes binary data (in protobuf wire format) from the
103
+ * given reader into the given message object.
104
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest} msg The message object to deserialize into.
105
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
106
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyRequest}
107
+ */
108
+ proto.scanoss.api.dependencies.v2.DependencyRequest.deserializeBinaryFromReader = function(msg, reader) {
109
+ while (reader.nextField()) {
110
+ if (reader.isEndGroup()) {
111
+ break;
112
+ }
113
+ var field = reader.getFieldNumber();
114
+ switch (field) {
115
+ case 1:
116
+ var value = new proto.scanoss.api.dependencies.v2.DependencyRequest.Files;
117
+ reader.readMessage(value,proto.scanoss.api.dependencies.v2.DependencyRequest.Files.deserializeBinaryFromReader);
118
+ msg.addFiles(value);
119
+ break;
120
+ case 2:
121
+ var value = /** @type {number} */ (reader.readInt32());
122
+ msg.setDepth(value);
123
+ break;
124
+ default:
125
+ reader.skipField();
126
+ break;
127
+ }
128
+ }
129
+ return msg;
130
+ };
131
+
132
+
133
+ /**
134
+ * Serializes the message to binary data (in protobuf wire format).
135
+ * @return {!Uint8Array}
136
+ */
137
+ proto.scanoss.api.dependencies.v2.DependencyRequest.prototype.serializeBinary = function() {
138
+ var writer = new jspb.BinaryWriter();
139
+ proto.scanoss.api.dependencies.v2.DependencyRequest.serializeBinaryToWriter(this, writer);
140
+ return writer.getResultBuffer();
141
+ };
142
+
143
+
144
+ /**
145
+ * Serializes the given message to binary data (in protobuf wire
146
+ * format), writing to the given BinaryWriter.
147
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest} message
148
+ * @param {!jspb.BinaryWriter} writer
149
+ * @suppress {unusedLocalVariables} f is only used for nested messages
150
+ */
151
+ proto.scanoss.api.dependencies.v2.DependencyRequest.serializeBinaryToWriter = function(message, writer) {
152
+ var f = undefined;
153
+ f = message.getFilesList();
154
+ if (f.length > 0) {
155
+ writer.writeRepeatedMessage(
156
+ 1,
157
+ f,
158
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.serializeBinaryToWriter
159
+ );
160
+ }
161
+ f = message.getDepth();
162
+ if (f !== 0) {
163
+ writer.writeInt32(
164
+ 2,
165
+ f
166
+ );
167
+ }
168
+ };
169
+
170
+
171
+
172
+ /**
173
+ * Generated by JsPbCodeGenerator.
174
+ * @param {Array=} opt_data Optional initial data array, typically from a
175
+ * server response, or constructed directly in Javascript. The array is used
176
+ * in place and becomes part of the constructed object. It is not cloned.
177
+ * If no data is provided, the constructed object will be empty, but still
178
+ * valid.
179
+ * @extends {jspb.Message}
180
+ * @constructor
181
+ */
182
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls = function(opt_data) {
183
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
184
+ };
185
+ goog.inherits(proto.scanoss.api.dependencies.v2.DependencyRequest.Purls, jspb.Message);
186
+ if (goog.DEBUG && !COMPILED) {
187
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.displayName = 'proto.scanoss.api.dependencies.v2.DependencyRequest.Purls';
188
+ }
189
+
190
+
191
+ if (jspb.Message.GENERATE_TO_OBJECT) {
192
+ /**
193
+ * Creates an object representation of this proto suitable for use in Soy templates.
194
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
195
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
196
+ * For the list of reserved names please see:
197
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
198
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
199
+ * for transitional soy proto support: http://goto/soy-param-migration
200
+ * @return {!Object}
201
+ */
202
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.prototype.toObject = function(opt_includeInstance) {
203
+ return proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.toObject(opt_includeInstance, this);
204
+ };
205
+
206
+
207
+ /**
208
+ * Static version of the {@see toObject} method.
209
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
210
+ * instance for transitional soy proto support:
211
+ * http://goto/soy-param-migration
212
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls} msg The msg instance to transform.
213
+ * @return {!Object}
214
+ * @suppress {unusedLocalVariables} f is only used for nested messages
215
+ */
216
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.toObject = function(includeInstance, msg) {
217
+ var f, obj = {
218
+ purl: jspb.Message.getFieldWithDefault(msg, 1, ""),
219
+ requirement: jspb.Message.getFieldWithDefault(msg, 2, "")
220
+ };
221
+
222
+ if (includeInstance) {
223
+ obj.$jspbMessageInstance = msg;
224
+ }
225
+ return obj;
226
+ };
227
+ }
228
+
229
+
230
+ /**
231
+ * Deserializes binary data (in protobuf wire format).
232
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
233
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls}
234
+ */
235
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.deserializeBinary = function(bytes) {
236
+ var reader = new jspb.BinaryReader(bytes);
237
+ var msg = new proto.scanoss.api.dependencies.v2.DependencyRequest.Purls;
238
+ return proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.deserializeBinaryFromReader(msg, reader);
239
+ };
240
+
241
+
242
+ /**
243
+ * Deserializes binary data (in protobuf wire format) from the
244
+ * given reader into the given message object.
245
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls} msg The message object to deserialize into.
246
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
247
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls}
248
+ */
249
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.deserializeBinaryFromReader = function(msg, reader) {
250
+ while (reader.nextField()) {
251
+ if (reader.isEndGroup()) {
252
+ break;
253
+ }
254
+ var field = reader.getFieldNumber();
255
+ switch (field) {
256
+ case 1:
257
+ var value = /** @type {string} */ (reader.readString());
258
+ msg.setPurl(value);
259
+ break;
260
+ case 2:
261
+ var value = /** @type {string} */ (reader.readString());
262
+ msg.setRequirement(value);
263
+ break;
264
+ default:
265
+ reader.skipField();
266
+ break;
267
+ }
268
+ }
269
+ return msg;
270
+ };
271
+
272
+
273
+ /**
274
+ * Serializes the message to binary data (in protobuf wire format).
275
+ * @return {!Uint8Array}
276
+ */
277
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.prototype.serializeBinary = function() {
278
+ var writer = new jspb.BinaryWriter();
279
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.serializeBinaryToWriter(this, writer);
280
+ return writer.getResultBuffer();
281
+ };
282
+
283
+
284
+ /**
285
+ * Serializes the given message to binary data (in protobuf wire
286
+ * format), writing to the given BinaryWriter.
287
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls} message
288
+ * @param {!jspb.BinaryWriter} writer
289
+ * @suppress {unusedLocalVariables} f is only used for nested messages
290
+ */
291
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.serializeBinaryToWriter = function(message, writer) {
292
+ var f = undefined;
293
+ f = message.getPurl();
294
+ if (f.length > 0) {
295
+ writer.writeString(
296
+ 1,
297
+ f
298
+ );
299
+ }
300
+ f = message.getRequirement();
301
+ if (f.length > 0) {
302
+ writer.writeString(
303
+ 2,
304
+ f
305
+ );
306
+ }
307
+ };
308
+
309
+
310
+ /**
311
+ * optional string purl = 1;
312
+ * @return {string}
313
+ */
314
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.prototype.getPurl = function() {
315
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
316
+ };
317
+
318
+
319
+ /** @param {string} value */
320
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.prototype.setPurl = function(value) {
321
+ jspb.Message.setProto3StringField(this, 1, value);
322
+ };
323
+
324
+
325
+ /**
326
+ * optional string requirement = 2;
327
+ * @return {string}
328
+ */
329
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.prototype.getRequirement = function() {
330
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
331
+ };
332
+
333
+
334
+ /** @param {string} value */
335
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.prototype.setRequirement = function(value) {
336
+ jspb.Message.setProto3StringField(this, 2, value);
337
+ };
338
+
339
+
340
+
341
+ /**
342
+ * Generated by JsPbCodeGenerator.
343
+ * @param {Array=} opt_data Optional initial data array, typically from a
344
+ * server response, or constructed directly in Javascript. The array is used
345
+ * in place and becomes part of the constructed object. It is not cloned.
346
+ * If no data is provided, the constructed object will be empty, but still
347
+ * valid.
348
+ * @extends {jspb.Message}
349
+ * @constructor
350
+ */
351
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files = function(opt_data) {
352
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.scanoss.api.dependencies.v2.DependencyRequest.Files.repeatedFields_, null);
353
+ };
354
+ goog.inherits(proto.scanoss.api.dependencies.v2.DependencyRequest.Files, jspb.Message);
355
+ if (goog.DEBUG && !COMPILED) {
356
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.displayName = 'proto.scanoss.api.dependencies.v2.DependencyRequest.Files';
357
+ }
358
+ /**
359
+ * List of repeated fields within this message type.
360
+ * @private {!Array<number>}
361
+ * @const
362
+ */
363
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.repeatedFields_ = [2];
364
+
365
+
366
+
367
+ if (jspb.Message.GENERATE_TO_OBJECT) {
368
+ /**
369
+ * Creates an object representation of this proto suitable for use in Soy templates.
370
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
371
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
372
+ * For the list of reserved names please see:
373
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
374
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
375
+ * for transitional soy proto support: http://goto/soy-param-migration
376
+ * @return {!Object}
377
+ */
378
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.prototype.toObject = function(opt_includeInstance) {
379
+ return proto.scanoss.api.dependencies.v2.DependencyRequest.Files.toObject(opt_includeInstance, this);
380
+ };
381
+
382
+
383
+ /**
384
+ * Static version of the {@see toObject} method.
385
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
386
+ * instance for transitional soy proto support:
387
+ * http://goto/soy-param-migration
388
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest.Files} msg The msg instance to transform.
389
+ * @return {!Object}
390
+ * @suppress {unusedLocalVariables} f is only used for nested messages
391
+ */
392
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.toObject = function(includeInstance, msg) {
393
+ var f, obj = {
394
+ file: jspb.Message.getFieldWithDefault(msg, 1, ""),
395
+ purlsList: jspb.Message.toObjectList(msg.getPurlsList(),
396
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.toObject, includeInstance)
397
+ };
398
+
399
+ if (includeInstance) {
400
+ obj.$jspbMessageInstance = msg;
401
+ }
402
+ return obj;
403
+ };
404
+ }
405
+
406
+
407
+ /**
408
+ * Deserializes binary data (in protobuf wire format).
409
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
410
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyRequest.Files}
411
+ */
412
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.deserializeBinary = function(bytes) {
413
+ var reader = new jspb.BinaryReader(bytes);
414
+ var msg = new proto.scanoss.api.dependencies.v2.DependencyRequest.Files;
415
+ return proto.scanoss.api.dependencies.v2.DependencyRequest.Files.deserializeBinaryFromReader(msg, reader);
416
+ };
417
+
418
+
419
+ /**
420
+ * Deserializes binary data (in protobuf wire format) from the
421
+ * given reader into the given message object.
422
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest.Files} msg The message object to deserialize into.
423
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
424
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyRequest.Files}
425
+ */
426
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.deserializeBinaryFromReader = function(msg, reader) {
427
+ while (reader.nextField()) {
428
+ if (reader.isEndGroup()) {
429
+ break;
430
+ }
431
+ var field = reader.getFieldNumber();
432
+ switch (field) {
433
+ case 1:
434
+ var value = /** @type {string} */ (reader.readString());
435
+ msg.setFile(value);
436
+ break;
437
+ case 2:
438
+ var value = new proto.scanoss.api.dependencies.v2.DependencyRequest.Purls;
439
+ reader.readMessage(value,proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.deserializeBinaryFromReader);
440
+ msg.addPurls(value);
441
+ break;
442
+ default:
443
+ reader.skipField();
444
+ break;
445
+ }
446
+ }
447
+ return msg;
448
+ };
449
+
450
+
451
+ /**
452
+ * Serializes the message to binary data (in protobuf wire format).
453
+ * @return {!Uint8Array}
454
+ */
455
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.prototype.serializeBinary = function() {
456
+ var writer = new jspb.BinaryWriter();
457
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.serializeBinaryToWriter(this, writer);
458
+ return writer.getResultBuffer();
459
+ };
460
+
461
+
462
+ /**
463
+ * Serializes the given message to binary data (in protobuf wire
464
+ * format), writing to the given BinaryWriter.
465
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest.Files} message
466
+ * @param {!jspb.BinaryWriter} writer
467
+ * @suppress {unusedLocalVariables} f is only used for nested messages
468
+ */
469
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.serializeBinaryToWriter = function(message, writer) {
470
+ var f = undefined;
471
+ f = message.getFile();
472
+ if (f.length > 0) {
473
+ writer.writeString(
474
+ 1,
475
+ f
476
+ );
477
+ }
478
+ f = message.getPurlsList();
479
+ if (f.length > 0) {
480
+ writer.writeRepeatedMessage(
481
+ 2,
482
+ f,
483
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Purls.serializeBinaryToWriter
484
+ );
485
+ }
486
+ };
487
+
488
+
489
+ /**
490
+ * optional string file = 1;
491
+ * @return {string}
492
+ */
493
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.prototype.getFile = function() {
494
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
495
+ };
496
+
497
+
498
+ /** @param {string} value */
499
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.prototype.setFile = function(value) {
500
+ jspb.Message.setProto3StringField(this, 1, value);
501
+ };
502
+
503
+
504
+ /**
505
+ * repeated Purls purls = 2;
506
+ * @return {!Array<!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls>}
507
+ */
508
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.prototype.getPurlsList = function() {
509
+ return /** @type{!Array<!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls>} */ (
510
+ jspb.Message.getRepeatedWrapperField(this, proto.scanoss.api.dependencies.v2.DependencyRequest.Purls, 2));
511
+ };
512
+
513
+
514
+ /** @param {!Array<!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls>} value */
515
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.prototype.setPurlsList = function(value) {
516
+ jspb.Message.setRepeatedWrapperField(this, 2, value);
517
+ };
518
+
519
+
520
+ /**
521
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls=} opt_value
522
+ * @param {number=} opt_index
523
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyRequest.Purls}
524
+ */
525
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.prototype.addPurls = function(opt_value, opt_index) {
526
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.scanoss.api.dependencies.v2.DependencyRequest.Purls, opt_index);
527
+ };
528
+
529
+
530
+ proto.scanoss.api.dependencies.v2.DependencyRequest.Files.prototype.clearPurlsList = function() {
531
+ this.setPurlsList([]);
532
+ };
533
+
534
+
535
+ /**
536
+ * repeated Files files = 1;
537
+ * @return {!Array<!proto.scanoss.api.dependencies.v2.DependencyRequest.Files>}
538
+ */
539
+ proto.scanoss.api.dependencies.v2.DependencyRequest.prototype.getFilesList = function() {
540
+ return /** @type{!Array<!proto.scanoss.api.dependencies.v2.DependencyRequest.Files>} */ (
541
+ jspb.Message.getRepeatedWrapperField(this, proto.scanoss.api.dependencies.v2.DependencyRequest.Files, 1));
542
+ };
543
+
544
+
545
+ /** @param {!Array<!proto.scanoss.api.dependencies.v2.DependencyRequest.Files>} value */
546
+ proto.scanoss.api.dependencies.v2.DependencyRequest.prototype.setFilesList = function(value) {
547
+ jspb.Message.setRepeatedWrapperField(this, 1, value);
548
+ };
549
+
550
+
551
+ /**
552
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyRequest.Files=} opt_value
553
+ * @param {number=} opt_index
554
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyRequest.Files}
555
+ */
556
+ proto.scanoss.api.dependencies.v2.DependencyRequest.prototype.addFiles = function(opt_value, opt_index) {
557
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.scanoss.api.dependencies.v2.DependencyRequest.Files, opt_index);
558
+ };
559
+
560
+
561
+ proto.scanoss.api.dependencies.v2.DependencyRequest.prototype.clearFilesList = function() {
562
+ this.setFilesList([]);
563
+ };
564
+
565
+
566
+ /**
567
+ * optional int32 depth = 2;
568
+ * @return {number}
569
+ */
570
+ proto.scanoss.api.dependencies.v2.DependencyRequest.prototype.getDepth = function() {
571
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
572
+ };
573
+
574
+
575
+ /** @param {number} value */
576
+ proto.scanoss.api.dependencies.v2.DependencyRequest.prototype.setDepth = function(value) {
577
+ jspb.Message.setProto3IntField(this, 2, value);
578
+ };
579
+
580
+
581
+
582
+ /**
583
+ * Generated by JsPbCodeGenerator.
584
+ * @param {Array=} opt_data Optional initial data array, typically from a
585
+ * server response, or constructed directly in Javascript. The array is used
586
+ * in place and becomes part of the constructed object. It is not cloned.
587
+ * If no data is provided, the constructed object will be empty, but still
588
+ * valid.
589
+ * @extends {jspb.Message}
590
+ * @constructor
591
+ */
592
+ proto.scanoss.api.dependencies.v2.DependencyResponse = function(opt_data) {
593
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.scanoss.api.dependencies.v2.DependencyResponse.repeatedFields_, null);
594
+ };
595
+ goog.inherits(proto.scanoss.api.dependencies.v2.DependencyResponse, jspb.Message);
596
+ if (goog.DEBUG && !COMPILED) {
597
+ proto.scanoss.api.dependencies.v2.DependencyResponse.displayName = 'proto.scanoss.api.dependencies.v2.DependencyResponse';
598
+ }
599
+ /**
600
+ * List of repeated fields within this message type.
601
+ * @private {!Array<number>}
602
+ * @const
603
+ */
604
+ proto.scanoss.api.dependencies.v2.DependencyResponse.repeatedFields_ = [1];
605
+
606
+
607
+
608
+ if (jspb.Message.GENERATE_TO_OBJECT) {
609
+ /**
610
+ * Creates an object representation of this proto suitable for use in Soy templates.
611
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
612
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
613
+ * For the list of reserved names please see:
614
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
615
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
616
+ * for transitional soy proto support: http://goto/soy-param-migration
617
+ * @return {!Object}
618
+ */
619
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.toObject = function(opt_includeInstance) {
620
+ return proto.scanoss.api.dependencies.v2.DependencyResponse.toObject(opt_includeInstance, this);
621
+ };
622
+
623
+
624
+ /**
625
+ * Static version of the {@see toObject} method.
626
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
627
+ * instance for transitional soy proto support:
628
+ * http://goto/soy-param-migration
629
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse} msg The msg instance to transform.
630
+ * @return {!Object}
631
+ * @suppress {unusedLocalVariables} f is only used for nested messages
632
+ */
633
+ proto.scanoss.api.dependencies.v2.DependencyResponse.toObject = function(includeInstance, msg) {
634
+ var f, obj = {
635
+ filesList: jspb.Message.toObjectList(msg.getFilesList(),
636
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.toObject, includeInstance),
637
+ status: (f = msg.getStatus()) && scanoss_api_common_v2_scanoss$common_pb.StatusResponse.toObject(includeInstance, f)
638
+ };
639
+
640
+ if (includeInstance) {
641
+ obj.$jspbMessageInstance = msg;
642
+ }
643
+ return obj;
644
+ };
645
+ }
646
+
647
+
648
+ /**
649
+ * Deserializes binary data (in protobuf wire format).
650
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
651
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse}
652
+ */
653
+ proto.scanoss.api.dependencies.v2.DependencyResponse.deserializeBinary = function(bytes) {
654
+ var reader = new jspb.BinaryReader(bytes);
655
+ var msg = new proto.scanoss.api.dependencies.v2.DependencyResponse;
656
+ return proto.scanoss.api.dependencies.v2.DependencyResponse.deserializeBinaryFromReader(msg, reader);
657
+ };
658
+
659
+
660
+ /**
661
+ * Deserializes binary data (in protobuf wire format) from the
662
+ * given reader into the given message object.
663
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse} msg The message object to deserialize into.
664
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
665
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse}
666
+ */
667
+ proto.scanoss.api.dependencies.v2.DependencyResponse.deserializeBinaryFromReader = function(msg, reader) {
668
+ while (reader.nextField()) {
669
+ if (reader.isEndGroup()) {
670
+ break;
671
+ }
672
+ var field = reader.getFieldNumber();
673
+ switch (field) {
674
+ case 1:
675
+ var value = new proto.scanoss.api.dependencies.v2.DependencyResponse.Files;
676
+ reader.readMessage(value,proto.scanoss.api.dependencies.v2.DependencyResponse.Files.deserializeBinaryFromReader);
677
+ msg.addFiles(value);
678
+ break;
679
+ case 2:
680
+ var value = new scanoss_api_common_v2_scanoss$common_pb.StatusResponse;
681
+ reader.readMessage(value,scanoss_api_common_v2_scanoss$common_pb.StatusResponse.deserializeBinaryFromReader);
682
+ msg.setStatus(value);
683
+ break;
684
+ default:
685
+ reader.skipField();
686
+ break;
687
+ }
688
+ }
689
+ return msg;
690
+ };
691
+
692
+
693
+ /**
694
+ * Serializes the message to binary data (in protobuf wire format).
695
+ * @return {!Uint8Array}
696
+ */
697
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.serializeBinary = function() {
698
+ var writer = new jspb.BinaryWriter();
699
+ proto.scanoss.api.dependencies.v2.DependencyResponse.serializeBinaryToWriter(this, writer);
700
+ return writer.getResultBuffer();
701
+ };
702
+
703
+
704
+ /**
705
+ * Serializes the given message to binary data (in protobuf wire
706
+ * format), writing to the given BinaryWriter.
707
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse} message
708
+ * @param {!jspb.BinaryWriter} writer
709
+ * @suppress {unusedLocalVariables} f is only used for nested messages
710
+ */
711
+ proto.scanoss.api.dependencies.v2.DependencyResponse.serializeBinaryToWriter = function(message, writer) {
712
+ var f = undefined;
713
+ f = message.getFilesList();
714
+ if (f.length > 0) {
715
+ writer.writeRepeatedMessage(
716
+ 1,
717
+ f,
718
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.serializeBinaryToWriter
719
+ );
720
+ }
721
+ f = message.getStatus();
722
+ if (f != null) {
723
+ writer.writeMessage(
724
+ 2,
725
+ f,
726
+ scanoss_api_common_v2_scanoss$common_pb.StatusResponse.serializeBinaryToWriter
727
+ );
728
+ }
729
+ };
730
+
731
+
732
+
733
+ /**
734
+ * Generated by JsPbCodeGenerator.
735
+ * @param {Array=} opt_data Optional initial data array, typically from a
736
+ * server response, or constructed directly in Javascript. The array is used
737
+ * in place and becomes part of the constructed object. It is not cloned.
738
+ * If no data is provided, the constructed object will be empty, but still
739
+ * valid.
740
+ * @extends {jspb.Message}
741
+ * @constructor
742
+ */
743
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses = function(opt_data) {
744
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
745
+ };
746
+ goog.inherits(proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses, jspb.Message);
747
+ if (goog.DEBUG && !COMPILED) {
748
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.displayName = 'proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses';
749
+ }
750
+
751
+
752
+ if (jspb.Message.GENERATE_TO_OBJECT) {
753
+ /**
754
+ * Creates an object representation of this proto suitable for use in Soy templates.
755
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
756
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
757
+ * For the list of reserved names please see:
758
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
759
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
760
+ * for transitional soy proto support: http://goto/soy-param-migration
761
+ * @return {!Object}
762
+ */
763
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.prototype.toObject = function(opt_includeInstance) {
764
+ return proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.toObject(opt_includeInstance, this);
765
+ };
766
+
767
+
768
+ /**
769
+ * Static version of the {@see toObject} method.
770
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
771
+ * instance for transitional soy proto support:
772
+ * http://goto/soy-param-migration
773
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses} msg The msg instance to transform.
774
+ * @return {!Object}
775
+ * @suppress {unusedLocalVariables} f is only used for nested messages
776
+ */
777
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.toObject = function(includeInstance, msg) {
778
+ var f, obj = {
779
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
780
+ spdxId: jspb.Message.getFieldWithDefault(msg, 2, ""),
781
+ isSpdxApproved: jspb.Message.getFieldWithDefault(msg, 3, false)
782
+ };
783
+
784
+ if (includeInstance) {
785
+ obj.$jspbMessageInstance = msg;
786
+ }
787
+ return obj;
788
+ };
789
+ }
790
+
791
+
792
+ /**
793
+ * Deserializes binary data (in protobuf wire format).
794
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
795
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses}
796
+ */
797
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.deserializeBinary = function(bytes) {
798
+ var reader = new jspb.BinaryReader(bytes);
799
+ var msg = new proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses;
800
+ return proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.deserializeBinaryFromReader(msg, reader);
801
+ };
802
+
803
+
804
+ /**
805
+ * Deserializes binary data (in protobuf wire format) from the
806
+ * given reader into the given message object.
807
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses} msg The message object to deserialize into.
808
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
809
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses}
810
+ */
811
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.deserializeBinaryFromReader = function(msg, reader) {
812
+ while (reader.nextField()) {
813
+ if (reader.isEndGroup()) {
814
+ break;
815
+ }
816
+ var field = reader.getFieldNumber();
817
+ switch (field) {
818
+ case 1:
819
+ var value = /** @type {string} */ (reader.readString());
820
+ msg.setName(value);
821
+ break;
822
+ case 2:
823
+ var value = /** @type {string} */ (reader.readString());
824
+ msg.setSpdxId(value);
825
+ break;
826
+ case 3:
827
+ var value = /** @type {boolean} */ (reader.readBool());
828
+ msg.setIsSpdxApproved(value);
829
+ break;
830
+ default:
831
+ reader.skipField();
832
+ break;
833
+ }
834
+ }
835
+ return msg;
836
+ };
837
+
838
+
839
+ /**
840
+ * Serializes the message to binary data (in protobuf wire format).
841
+ * @return {!Uint8Array}
842
+ */
843
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.prototype.serializeBinary = function() {
844
+ var writer = new jspb.BinaryWriter();
845
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.serializeBinaryToWriter(this, writer);
846
+ return writer.getResultBuffer();
847
+ };
848
+
849
+
850
+ /**
851
+ * Serializes the given message to binary data (in protobuf wire
852
+ * format), writing to the given BinaryWriter.
853
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses} message
854
+ * @param {!jspb.BinaryWriter} writer
855
+ * @suppress {unusedLocalVariables} f is only used for nested messages
856
+ */
857
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.serializeBinaryToWriter = function(message, writer) {
858
+ var f = undefined;
859
+ f = message.getName();
860
+ if (f.length > 0) {
861
+ writer.writeString(
862
+ 1,
863
+ f
864
+ );
865
+ }
866
+ f = message.getSpdxId();
867
+ if (f.length > 0) {
868
+ writer.writeString(
869
+ 2,
870
+ f
871
+ );
872
+ }
873
+ f = message.getIsSpdxApproved();
874
+ if (f) {
875
+ writer.writeBool(
876
+ 3,
877
+ f
878
+ );
879
+ }
880
+ };
881
+
882
+
883
+ /**
884
+ * optional string name = 1;
885
+ * @return {string}
886
+ */
887
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.prototype.getName = function() {
888
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
889
+ };
890
+
891
+
892
+ /** @param {string} value */
893
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.prototype.setName = function(value) {
894
+ jspb.Message.setProto3StringField(this, 1, value);
895
+ };
896
+
897
+
898
+ /**
899
+ * optional string spdx_id = 2;
900
+ * @return {string}
901
+ */
902
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.prototype.getSpdxId = function() {
903
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
904
+ };
905
+
906
+
907
+ /** @param {string} value */
908
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.prototype.setSpdxId = function(value) {
909
+ jspb.Message.setProto3StringField(this, 2, value);
910
+ };
911
+
912
+
913
+ /**
914
+ * optional bool is_spdx_approved = 3;
915
+ * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
916
+ * You should avoid comparisons like {@code val === true/false} in those cases.
917
+ * @return {boolean}
918
+ */
919
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.prototype.getIsSpdxApproved = function() {
920
+ return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false));
921
+ };
922
+
923
+
924
+ /** @param {boolean} value */
925
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.prototype.setIsSpdxApproved = function(value) {
926
+ jspb.Message.setProto3BooleanField(this, 3, value);
927
+ };
928
+
929
+
930
+
931
+ /**
932
+ * Generated by JsPbCodeGenerator.
933
+ * @param {Array=} opt_data Optional initial data array, typically from a
934
+ * server response, or constructed directly in Javascript. The array is used
935
+ * in place and becomes part of the constructed object. It is not cloned.
936
+ * If no data is provided, the constructed object will be empty, but still
937
+ * valid.
938
+ * @extends {jspb.Message}
939
+ * @constructor
940
+ */
941
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies = function(opt_data) {
942
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.repeatedFields_, null);
943
+ };
944
+ goog.inherits(proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies, jspb.Message);
945
+ if (goog.DEBUG && !COMPILED) {
946
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.displayName = 'proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies';
947
+ }
948
+ /**
949
+ * List of repeated fields within this message type.
950
+ * @private {!Array<number>}
951
+ * @const
952
+ */
953
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.repeatedFields_ = [4];
954
+
955
+
956
+
957
+ if (jspb.Message.GENERATE_TO_OBJECT) {
958
+ /**
959
+ * Creates an object representation of this proto suitable for use in Soy templates.
960
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
961
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
962
+ * For the list of reserved names please see:
963
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
964
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
965
+ * for transitional soy proto support: http://goto/soy-param-migration
966
+ * @return {!Object}
967
+ */
968
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.toObject = function(opt_includeInstance) {
969
+ return proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.toObject(opt_includeInstance, this);
970
+ };
971
+
972
+
973
+ /**
974
+ * Static version of the {@see toObject} method.
975
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
976
+ * instance for transitional soy proto support:
977
+ * http://goto/soy-param-migration
978
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies} msg The msg instance to transform.
979
+ * @return {!Object}
980
+ * @suppress {unusedLocalVariables} f is only used for nested messages
981
+ */
982
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.toObject = function(includeInstance, msg) {
983
+ var f, obj = {
984
+ component: jspb.Message.getFieldWithDefault(msg, 1, ""),
985
+ purl: jspb.Message.getFieldWithDefault(msg, 2, ""),
986
+ version: jspb.Message.getFieldWithDefault(msg, 3, ""),
987
+ licensesList: jspb.Message.toObjectList(msg.getLicensesList(),
988
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.toObject, includeInstance)
989
+ };
990
+
991
+ if (includeInstance) {
992
+ obj.$jspbMessageInstance = msg;
993
+ }
994
+ return obj;
995
+ };
996
+ }
997
+
998
+
999
+ /**
1000
+ * Deserializes binary data (in protobuf wire format).
1001
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1002
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies}
1003
+ */
1004
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.deserializeBinary = function(bytes) {
1005
+ var reader = new jspb.BinaryReader(bytes);
1006
+ var msg = new proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies;
1007
+ return proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.deserializeBinaryFromReader(msg, reader);
1008
+ };
1009
+
1010
+
1011
+ /**
1012
+ * Deserializes binary data (in protobuf wire format) from the
1013
+ * given reader into the given message object.
1014
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies} msg The message object to deserialize into.
1015
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1016
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies}
1017
+ */
1018
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.deserializeBinaryFromReader = function(msg, reader) {
1019
+ while (reader.nextField()) {
1020
+ if (reader.isEndGroup()) {
1021
+ break;
1022
+ }
1023
+ var field = reader.getFieldNumber();
1024
+ switch (field) {
1025
+ case 1:
1026
+ var value = /** @type {string} */ (reader.readString());
1027
+ msg.setComponent(value);
1028
+ break;
1029
+ case 2:
1030
+ var value = /** @type {string} */ (reader.readString());
1031
+ msg.setPurl(value);
1032
+ break;
1033
+ case 3:
1034
+ var value = /** @type {string} */ (reader.readString());
1035
+ msg.setVersion(value);
1036
+ break;
1037
+ case 4:
1038
+ var value = new proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses;
1039
+ reader.readMessage(value,proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.deserializeBinaryFromReader);
1040
+ msg.addLicenses(value);
1041
+ break;
1042
+ default:
1043
+ reader.skipField();
1044
+ break;
1045
+ }
1046
+ }
1047
+ return msg;
1048
+ };
1049
+
1050
+
1051
+ /**
1052
+ * Serializes the message to binary data (in protobuf wire format).
1053
+ * @return {!Uint8Array}
1054
+ */
1055
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.serializeBinary = function() {
1056
+ var writer = new jspb.BinaryWriter();
1057
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.serializeBinaryToWriter(this, writer);
1058
+ return writer.getResultBuffer();
1059
+ };
1060
+
1061
+
1062
+ /**
1063
+ * Serializes the given message to binary data (in protobuf wire
1064
+ * format), writing to the given BinaryWriter.
1065
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies} message
1066
+ * @param {!jspb.BinaryWriter} writer
1067
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1068
+ */
1069
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.serializeBinaryToWriter = function(message, writer) {
1070
+ var f = undefined;
1071
+ f = message.getComponent();
1072
+ if (f.length > 0) {
1073
+ writer.writeString(
1074
+ 1,
1075
+ f
1076
+ );
1077
+ }
1078
+ f = message.getPurl();
1079
+ if (f.length > 0) {
1080
+ writer.writeString(
1081
+ 2,
1082
+ f
1083
+ );
1084
+ }
1085
+ f = message.getVersion();
1086
+ if (f.length > 0) {
1087
+ writer.writeString(
1088
+ 3,
1089
+ f
1090
+ );
1091
+ }
1092
+ f = message.getLicensesList();
1093
+ if (f.length > 0) {
1094
+ writer.writeRepeatedMessage(
1095
+ 4,
1096
+ f,
1097
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses.serializeBinaryToWriter
1098
+ );
1099
+ }
1100
+ };
1101
+
1102
+
1103
+ /**
1104
+ * optional string component = 1;
1105
+ * @return {string}
1106
+ */
1107
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.getComponent = function() {
1108
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1109
+ };
1110
+
1111
+
1112
+ /** @param {string} value */
1113
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.setComponent = function(value) {
1114
+ jspb.Message.setProto3StringField(this, 1, value);
1115
+ };
1116
+
1117
+
1118
+ /**
1119
+ * optional string purl = 2;
1120
+ * @return {string}
1121
+ */
1122
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.getPurl = function() {
1123
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1124
+ };
1125
+
1126
+
1127
+ /** @param {string} value */
1128
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.setPurl = function(value) {
1129
+ jspb.Message.setProto3StringField(this, 2, value);
1130
+ };
1131
+
1132
+
1133
+ /**
1134
+ * optional string version = 3;
1135
+ * @return {string}
1136
+ */
1137
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.getVersion = function() {
1138
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1139
+ };
1140
+
1141
+
1142
+ /** @param {string} value */
1143
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.setVersion = function(value) {
1144
+ jspb.Message.setProto3StringField(this, 3, value);
1145
+ };
1146
+
1147
+
1148
+ /**
1149
+ * repeated Licenses licenses = 4;
1150
+ * @return {!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses>}
1151
+ */
1152
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.getLicensesList = function() {
1153
+ return /** @type{!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses>} */ (
1154
+ jspb.Message.getRepeatedWrapperField(this, proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses, 4));
1155
+ };
1156
+
1157
+
1158
+ /** @param {!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses>} value */
1159
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.setLicensesList = function(value) {
1160
+ jspb.Message.setRepeatedWrapperField(this, 4, value);
1161
+ };
1162
+
1163
+
1164
+ /**
1165
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses=} opt_value
1166
+ * @param {number=} opt_index
1167
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses}
1168
+ */
1169
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.addLicenses = function(opt_value, opt_index) {
1170
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.scanoss.api.dependencies.v2.DependencyResponse.Licenses, opt_index);
1171
+ };
1172
+
1173
+
1174
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.prototype.clearLicensesList = function() {
1175
+ this.setLicensesList([]);
1176
+ };
1177
+
1178
+
1179
+
1180
+ /**
1181
+ * Generated by JsPbCodeGenerator.
1182
+ * @param {Array=} opt_data Optional initial data array, typically from a
1183
+ * server response, or constructed directly in Javascript. The array is used
1184
+ * in place and becomes part of the constructed object. It is not cloned.
1185
+ * If no data is provided, the constructed object will be empty, but still
1186
+ * valid.
1187
+ * @extends {jspb.Message}
1188
+ * @constructor
1189
+ */
1190
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files = function(opt_data) {
1191
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.scanoss.api.dependencies.v2.DependencyResponse.Files.repeatedFields_, null);
1192
+ };
1193
+ goog.inherits(proto.scanoss.api.dependencies.v2.DependencyResponse.Files, jspb.Message);
1194
+ if (goog.DEBUG && !COMPILED) {
1195
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.displayName = 'proto.scanoss.api.dependencies.v2.DependencyResponse.Files';
1196
+ }
1197
+ /**
1198
+ * List of repeated fields within this message type.
1199
+ * @private {!Array<number>}
1200
+ * @const
1201
+ */
1202
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.repeatedFields_ = [4];
1203
+
1204
+
1205
+
1206
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1207
+ /**
1208
+ * Creates an object representation of this proto suitable for use in Soy templates.
1209
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1210
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1211
+ * For the list of reserved names please see:
1212
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
1213
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
1214
+ * for transitional soy proto support: http://goto/soy-param-migration
1215
+ * @return {!Object}
1216
+ */
1217
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.toObject = function(opt_includeInstance) {
1218
+ return proto.scanoss.api.dependencies.v2.DependencyResponse.Files.toObject(opt_includeInstance, this);
1219
+ };
1220
+
1221
+
1222
+ /**
1223
+ * Static version of the {@see toObject} method.
1224
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
1225
+ * instance for transitional soy proto support:
1226
+ * http://goto/soy-param-migration
1227
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Files} msg The msg instance to transform.
1228
+ * @return {!Object}
1229
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1230
+ */
1231
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.toObject = function(includeInstance, msg) {
1232
+ var f, obj = {
1233
+ file: jspb.Message.getFieldWithDefault(msg, 1, ""),
1234
+ id: jspb.Message.getFieldWithDefault(msg, 2, ""),
1235
+ status: jspb.Message.getFieldWithDefault(msg, 3, ""),
1236
+ dependenciesList: jspb.Message.toObjectList(msg.getDependenciesList(),
1237
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.toObject, includeInstance)
1238
+ };
1239
+
1240
+ if (includeInstance) {
1241
+ obj.$jspbMessageInstance = msg;
1242
+ }
1243
+ return obj;
1244
+ };
1245
+ }
1246
+
1247
+
1248
+ /**
1249
+ * Deserializes binary data (in protobuf wire format).
1250
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1251
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Files}
1252
+ */
1253
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.deserializeBinary = function(bytes) {
1254
+ var reader = new jspb.BinaryReader(bytes);
1255
+ var msg = new proto.scanoss.api.dependencies.v2.DependencyResponse.Files;
1256
+ return proto.scanoss.api.dependencies.v2.DependencyResponse.Files.deserializeBinaryFromReader(msg, reader);
1257
+ };
1258
+
1259
+
1260
+ /**
1261
+ * Deserializes binary data (in protobuf wire format) from the
1262
+ * given reader into the given message object.
1263
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Files} msg The message object to deserialize into.
1264
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1265
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Files}
1266
+ */
1267
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.deserializeBinaryFromReader = function(msg, reader) {
1268
+ while (reader.nextField()) {
1269
+ if (reader.isEndGroup()) {
1270
+ break;
1271
+ }
1272
+ var field = reader.getFieldNumber();
1273
+ switch (field) {
1274
+ case 1:
1275
+ var value = /** @type {string} */ (reader.readString());
1276
+ msg.setFile(value);
1277
+ break;
1278
+ case 2:
1279
+ var value = /** @type {string} */ (reader.readString());
1280
+ msg.setId(value);
1281
+ break;
1282
+ case 3:
1283
+ var value = /** @type {string} */ (reader.readString());
1284
+ msg.setStatus(value);
1285
+ break;
1286
+ case 4:
1287
+ var value = new proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies;
1288
+ reader.readMessage(value,proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.deserializeBinaryFromReader);
1289
+ msg.addDependencies(value);
1290
+ break;
1291
+ default:
1292
+ reader.skipField();
1293
+ break;
1294
+ }
1295
+ }
1296
+ return msg;
1297
+ };
1298
+
1299
+
1300
+ /**
1301
+ * Serializes the message to binary data (in protobuf wire format).
1302
+ * @return {!Uint8Array}
1303
+ */
1304
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.serializeBinary = function() {
1305
+ var writer = new jspb.BinaryWriter();
1306
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.serializeBinaryToWriter(this, writer);
1307
+ return writer.getResultBuffer();
1308
+ };
1309
+
1310
+
1311
+ /**
1312
+ * Serializes the given message to binary data (in protobuf wire
1313
+ * format), writing to the given BinaryWriter.
1314
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Files} message
1315
+ * @param {!jspb.BinaryWriter} writer
1316
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1317
+ */
1318
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.serializeBinaryToWriter = function(message, writer) {
1319
+ var f = undefined;
1320
+ f = message.getFile();
1321
+ if (f.length > 0) {
1322
+ writer.writeString(
1323
+ 1,
1324
+ f
1325
+ );
1326
+ }
1327
+ f = message.getId();
1328
+ if (f.length > 0) {
1329
+ writer.writeString(
1330
+ 2,
1331
+ f
1332
+ );
1333
+ }
1334
+ f = message.getStatus();
1335
+ if (f.length > 0) {
1336
+ writer.writeString(
1337
+ 3,
1338
+ f
1339
+ );
1340
+ }
1341
+ f = message.getDependenciesList();
1342
+ if (f.length > 0) {
1343
+ writer.writeRepeatedMessage(
1344
+ 4,
1345
+ f,
1346
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies.serializeBinaryToWriter
1347
+ );
1348
+ }
1349
+ };
1350
+
1351
+
1352
+ /**
1353
+ * optional string file = 1;
1354
+ * @return {string}
1355
+ */
1356
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.getFile = function() {
1357
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1358
+ };
1359
+
1360
+
1361
+ /** @param {string} value */
1362
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.setFile = function(value) {
1363
+ jspb.Message.setProto3StringField(this, 1, value);
1364
+ };
1365
+
1366
+
1367
+ /**
1368
+ * optional string id = 2;
1369
+ * @return {string}
1370
+ */
1371
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.getId = function() {
1372
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1373
+ };
1374
+
1375
+
1376
+ /** @param {string} value */
1377
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.setId = function(value) {
1378
+ jspb.Message.setProto3StringField(this, 2, value);
1379
+ };
1380
+
1381
+
1382
+ /**
1383
+ * optional string status = 3;
1384
+ * @return {string}
1385
+ */
1386
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.getStatus = function() {
1387
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1388
+ };
1389
+
1390
+
1391
+ /** @param {string} value */
1392
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.setStatus = function(value) {
1393
+ jspb.Message.setProto3StringField(this, 3, value);
1394
+ };
1395
+
1396
+
1397
+ /**
1398
+ * repeated Dependencies dependencies = 4;
1399
+ * @return {!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies>}
1400
+ */
1401
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.getDependenciesList = function() {
1402
+ return /** @type{!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies>} */ (
1403
+ jspb.Message.getRepeatedWrapperField(this, proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies, 4));
1404
+ };
1405
+
1406
+
1407
+ /** @param {!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies>} value */
1408
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.setDependenciesList = function(value) {
1409
+ jspb.Message.setRepeatedWrapperField(this, 4, value);
1410
+ };
1411
+
1412
+
1413
+ /**
1414
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies=} opt_value
1415
+ * @param {number=} opt_index
1416
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies}
1417
+ */
1418
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.addDependencies = function(opt_value, opt_index) {
1419
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.scanoss.api.dependencies.v2.DependencyResponse.Dependencies, opt_index);
1420
+ };
1421
+
1422
+
1423
+ proto.scanoss.api.dependencies.v2.DependencyResponse.Files.prototype.clearDependenciesList = function() {
1424
+ this.setDependenciesList([]);
1425
+ };
1426
+
1427
+
1428
+ /**
1429
+ * repeated Files files = 1;
1430
+ * @return {!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Files>}
1431
+ */
1432
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.getFilesList = function() {
1433
+ return /** @type{!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Files>} */ (
1434
+ jspb.Message.getRepeatedWrapperField(this, proto.scanoss.api.dependencies.v2.DependencyResponse.Files, 1));
1435
+ };
1436
+
1437
+
1438
+ /** @param {!Array<!proto.scanoss.api.dependencies.v2.DependencyResponse.Files>} value */
1439
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.setFilesList = function(value) {
1440
+ jspb.Message.setRepeatedWrapperField(this, 1, value);
1441
+ };
1442
+
1443
+
1444
+ /**
1445
+ * @param {!proto.scanoss.api.dependencies.v2.DependencyResponse.Files=} opt_value
1446
+ * @param {number=} opt_index
1447
+ * @return {!proto.scanoss.api.dependencies.v2.DependencyResponse.Files}
1448
+ */
1449
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.addFiles = function(opt_value, opt_index) {
1450
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.scanoss.api.dependencies.v2.DependencyResponse.Files, opt_index);
1451
+ };
1452
+
1453
+
1454
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.clearFilesList = function() {
1455
+ this.setFilesList([]);
1456
+ };
1457
+
1458
+
1459
+ /**
1460
+ * optional scanoss.api.common.v2.StatusResponse status = 2;
1461
+ * @return {?proto.scanoss.api.common.v2.StatusResponse}
1462
+ */
1463
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.getStatus = function() {
1464
+ return /** @type{?proto.scanoss.api.common.v2.StatusResponse} */ (
1465
+ jspb.Message.getWrapperField(this, scanoss_api_common_v2_scanoss$common_pb.StatusResponse, 2));
1466
+ };
1467
+
1468
+
1469
+ /** @param {?proto.scanoss.api.common.v2.StatusResponse|undefined} value */
1470
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.setStatus = function(value) {
1471
+ jspb.Message.setWrapperField(this, 2, value);
1472
+ };
1473
+
1474
+
1475
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.clearStatus = function() {
1476
+ this.setStatus(undefined);
1477
+ };
1478
+
1479
+
1480
+ /**
1481
+ * Returns whether this field is set.
1482
+ * @return {!boolean}
1483
+ */
1484
+ proto.scanoss.api.dependencies.v2.DependencyResponse.prototype.hasStatus = function() {
1485
+ return jspb.Message.getField(this, 2) != null;
1486
+ };
1487
+
1488
+
1489
+ goog.object.extend(exports, proto.scanoss.api.dependencies.v2);