Skip to content

Commit 20925e8

Browse files
fix(trafficdirector): update the API
#### trafficdirector:v3 The following keys were changed: - schemas.StringMatcher.properties.contains.description - schemas.StringMatcher.properties.ignoreCase.description - schemas.StringMatcher.properties.prefix.description - schemas.StringMatcher.properties.suffix.description
1 parent 087b4e4 commit 20925e8

File tree

3 files changed

+113
-9
lines changed

3 files changed

+113
-9
lines changed

discovery/trafficdirector-v3.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
}
129129
}
130130
},
131-
"revision": "20250423",
131+
"revision": "20250516",
132132
"rootUrl": "https://trafficdirector.googleapis.com/",
133133
"schemas": {
134134
"Address": {
@@ -1226,7 +1226,7 @@
12261226
"id": "StringMatcher",
12271227
"properties": {
12281228
"contains": {
1229-
"description": "The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``",
1229+
"description": "The input string must have the substring specified here. .. note:: Empty contains match is not allowed, please use ``safe_regex`` instead. Examples: * ``abc`` matches the value ``xyz.abc.def``",
12301230
"type": "string"
12311231
},
12321232
"custom": {
@@ -1238,19 +1238,19 @@
12381238
"type": "string"
12391239
},
12401240
"ignoreCase": {
1241-
"description": "If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This has no effect for the safe_regex match. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true.",
1241+
"description": "If ``true``, indicates the exact/prefix/suffix/contains matching should be case insensitive. This has no effect for the ``safe_regex`` match. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if this option is set to ``true``.",
12421242
"type": "boolean"
12431243
},
12441244
"prefix": {
1245-
"description": "The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``abc.xyz``",
1245+
"description": "The input string must have the prefix specified here. .. note:: Empty prefix match is not allowed, please use ``safe_regex`` instead. Examples: * ``abc`` matches the value ``abc.xyz``",
12461246
"type": "string"
12471247
},
12481248
"safeRegex": {
12491249
"$ref": "RegexMatcher",
12501250
"description": "The input string must match the regular expression specified here."
12511251
},
12521252
"suffix": {
1253-
"description": "The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc``",
1253+
"description": "The input string must have the suffix specified here. .. note:: Empty suffix match is not allowed, please use ``safe_regex`` instead. Examples: * ``abc`` matches the value ``xyz.abc``",
12541254
"type": "string"
12551255
}
12561256
},

src/apis/trafficdirector/v2.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,57 @@ export namespace trafficdirector_v2 {
689689
}
690690

691691
/**
692+
* @example
693+
* ```js
694+
* // Before running the sample:
695+
* // - Enable the API at:
696+
* // https://console.developers.google.com/apis/api/trafficdirector.googleapis.com
697+
* // - Login into gcloud by running:
698+
* // ```sh
699+
* // $ gcloud auth application-default login
700+
* // ```
701+
* // - Install the npm module by running:
702+
* // ```sh
703+
* // $ npm install googleapis
704+
* // ```
705+
*
706+
* const {google} = require('googleapis');
707+
* const trafficdirector = google.trafficdirector('v2');
708+
*
709+
* async function main() {
710+
* const auth = new google.auth.GoogleAuth({
711+
* // Scopes can be specified either as an array or as a single, space-delimited string.
712+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
713+
* });
714+
*
715+
* // Acquire an auth client, and bind it to all future calls
716+
* const authClient = await auth.getClient();
717+
* google.options({auth: authClient});
718+
*
719+
* // Do the magic
720+
* const res = await trafficdirector.discovery.client_status({
721+
* // Request body metadata
722+
* requestBody: {
723+
* // request body parameters
724+
* // {
725+
* // "nodeMatchers": []
726+
* // }
727+
* },
728+
* });
729+
* console.log(res.data);
730+
*
731+
* // Example response
732+
* // {
733+
* // "config": []
734+
* // }
735+
* }
736+
*
737+
* main().catch(e => {
738+
* console.error(e);
739+
* throw e;
740+
* });
741+
*
742+
* ```
692743
*
693744
* @param params - Parameters for request
694745
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

src/apis/trafficdirector/v3.ts

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ export namespace trafficdirector_v3 {
788788
*/
789789
export interface Schema$StringMatcher {
790790
/**
791-
* The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``
791+
* The input string must have the substring specified here. .. note:: Empty contains match is not allowed, please use ``safe_regex`` instead. Examples: * ``abc`` matches the value ``xyz.abc.def``
792792
*/
793793
contains?: string | null;
794794
/**
@@ -800,19 +800,19 @@ export namespace trafficdirector_v3 {
800800
*/
801801
exact?: string | null;
802802
/**
803-
* If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This has no effect for the safe_regex match. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true.
803+
* If ``true``, indicates the exact/prefix/suffix/contains matching should be case insensitive. This has no effect for the ``safe_regex`` match. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if this option is set to ``true``.
804804
*/
805805
ignoreCase?: boolean | null;
806806
/**
807-
* The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``abc.xyz``
807+
* The input string must have the prefix specified here. .. note:: Empty prefix match is not allowed, please use ``safe_regex`` instead. Examples: * ``abc`` matches the value ``abc.xyz``
808808
*/
809809
prefix?: string | null;
810810
/**
811811
* The input string must match the regular expression specified here.
812812
*/
813813
safeRegex?: Schema$RegexMatcher;
814814
/**
815-
* The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc``
815+
* The input string must have the suffix specified here. .. note:: Empty suffix match is not allowed, please use ``safe_regex`` instead. Examples: * ``abc`` matches the value ``xyz.abc``
816816
*/
817817
suffix?: string | null;
818818
}
@@ -901,6 +901,59 @@ export namespace trafficdirector_v3 {
901901
}
902902

903903
/**
904+
* @example
905+
* ```js
906+
* // Before running the sample:
907+
* // - Enable the API at:
908+
* // https://console.developers.google.com/apis/api/trafficdirector.googleapis.com
909+
* // - Login into gcloud by running:
910+
* // ```sh
911+
* // $ gcloud auth application-default login
912+
* // ```
913+
* // - Install the npm module by running:
914+
* // ```sh
915+
* // $ npm install googleapis
916+
* // ```
917+
*
918+
* const {google} = require('googleapis');
919+
* const trafficdirector = google.trafficdirector('v3');
920+
*
921+
* async function main() {
922+
* const auth = new google.auth.GoogleAuth({
923+
* // Scopes can be specified either as an array or as a single, space-delimited string.
924+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
925+
* });
926+
*
927+
* // Acquire an auth client, and bind it to all future calls
928+
* const authClient = await auth.getClient();
929+
* google.options({auth: authClient});
930+
*
931+
* // Do the magic
932+
* const res = await trafficdirector.discovery.client_status({
933+
* // Request body metadata
934+
* requestBody: {
935+
* // request body parameters
936+
* // {
937+
* // "excludeResourceContents": false,
938+
* // "node": {},
939+
* // "nodeMatchers": []
940+
* // }
941+
* },
942+
* });
943+
* console.log(res.data);
944+
*
945+
* // Example response
946+
* // {
947+
* // "config": []
948+
* // }
949+
* }
950+
*
951+
* main().catch(e => {
952+
* console.error(e);
953+
* throw e;
954+
* });
955+
*
956+
* ```
904957
*
905958
* @param params - Parameters for request
906959
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

0 commit comments

Comments
 (0)