@@ -588,6 +588,7 @@ class DiscoveryV1 extends BaseService {
588588 * "Subject": "Apples"
589589 * } ```.
590590 * @param {string } [params.file_content_type] - The content type of file.
591+ * @param {string } [params.filename] - The filename for file.
591592 * @param {Object } [params.headers] - Custom request headers
592593 * @param {Function } [callback] - The callback that handles the response.
593594 * @returns {NodeJS.ReadableStream|void }
@@ -600,10 +601,18 @@ class DiscoveryV1 extends BaseService {
600601 if ( missingParams ) {
601602 return _callback ( missingParams ) ;
602603 }
604+
605+ if ( _params . file && ! _params . filename ) {
606+ console . warn (
607+ 'WARNING: `filename` should be provided if `file` is not null. This will be REQUIRED in the next major release.'
608+ ) ;
609+ }
610+
603611 const formData = {
604612 'configuration' : _params . configuration ,
605613 'file' : {
606614 data : _params . file ,
615+ filename : _params . filename ,
607616 contentType : _params . file_content_type
608617 } ,
609618 'metadata' : _params . metadata
@@ -1079,6 +1088,7 @@ class DiscoveryV1 extends BaseService {
10791088 * "Subject": "Apples"
10801089 * } ```.
10811090 * @param {string } [params.file_content_type] - The content type of file.
1091+ * @param {string } [params.filename] - The filename for file.
10821092 * @param {Object } [params.headers] - Custom request headers
10831093 * @param {Function } [callback] - The callback that handles the response.
10841094 * @returns {NodeJS.ReadableStream|void }
@@ -1091,9 +1101,17 @@ class DiscoveryV1 extends BaseService {
10911101 if ( missingParams ) {
10921102 return _callback ( missingParams ) ;
10931103 }
1104+
1105+ if ( _params . file && ! _params . filename ) {
1106+ console . warn (
1107+ 'WARNING: `filename` should be provided if `file` is not null. This will be REQUIRED in the next major release.'
1108+ ) ;
1109+ }
1110+
10941111 const formData = {
10951112 'file' : {
10961113 data : _params . file ,
1114+ filename : _params . filename ,
10971115 contentType : _params . file_content_type
10981116 } ,
10991117 'metadata' : _params . metadata
@@ -1225,6 +1243,7 @@ class DiscoveryV1 extends BaseService {
12251243 * "Subject": "Apples"
12261244 * } ```.
12271245 * @param {string } [params.file_content_type] - The content type of file.
1246+ * @param {string } [params.filename] - The filename for file.
12281247 * @param {Object } [params.headers] - Custom request headers
12291248 * @param {Function } [callback] - The callback that handles the response.
12301249 * @returns {NodeJS.ReadableStream|void }
@@ -1237,9 +1256,17 @@ class DiscoveryV1 extends BaseService {
12371256 if ( missingParams ) {
12381257 return _callback ( missingParams ) ;
12391258 }
1259+
1260+ if ( _params . file && ! _params . filename ) {
1261+ console . warn (
1262+ 'WARNING: `filename` should be provided if `file` is not null. This will be REQUIRED in the next major release.'
1263+ ) ;
1264+ }
1265+
12401266 const formData = {
12411267 'file' : {
12421268 data : _params . file ,
1269+ filename : _params . filename ,
12431270 contentType : _params . file_content_type
12441271 } ,
12451272 'metadata' : _params . metadata
@@ -3017,6 +3044,8 @@ namespace DiscoveryV1 {
30173044 metadata ?: string ;
30183045 /** The content type of file. */
30193046 file_content_type ?: TestConfigurationInEnvironmentConstants . FileContentType | string ;
3047+ /** The filename for file. */
3048+ filename ?: string ;
30203049 headers ?: Object ;
30213050 }
30223051
@@ -3166,6 +3195,8 @@ namespace DiscoveryV1 {
31663195 metadata ?: string ;
31673196 /** The content type of file. */
31683197 file_content_type ?: AddDocumentConstants . FileContentType | string ;
3198+ /** The filename for file. */
3199+ filename ?: string ;
31693200 headers ?: Object ;
31703201 }
31713202
@@ -3218,6 +3249,8 @@ namespace DiscoveryV1 {
32183249 metadata ?: string ;
32193250 /** The content type of file. */
32203251 file_content_type ?: UpdateDocumentConstants . FileContentType | string ;
3252+ /** The filename for file. */
3253+ filename ?: string ;
32213254 headers ?: Object ;
32223255 }
32233256
0 commit comments