Skip to content

Commit cf6c444

Browse files
yoshi-automationalexander-fenster
authored andcommitted
feat: load protos from JSON, grpc-fallback support
* [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * fixes * fix webpack.config.js
1 parent 06dd6a7 commit cf6c444

12 files changed

+570
-94
lines changed

packages/google-cloud-redis/protos/protos.json

+359
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,365 @@
396396
"fields": {}
397397
}
398398
}
399+
},
400+
"v1beta1": {
401+
"options": {
402+
"go_package": "google.golang.org/genproto/googleapis/cloud/redis/v1beta1;redis",
403+
"java_multiple_files": true,
404+
"java_outer_classname": "CloudRedisServiceBetaProto",
405+
"java_package": "com.google.cloud.redis.v1beta1"
406+
},
407+
"nested": {
408+
"CloudRedis": {
409+
"options": {
410+
"(google.api.default_host)": "redis.googleapis.com"
411+
},
412+
"methods": {
413+
"ListInstances": {
414+
"requestType": "ListInstancesRequest",
415+
"responseType": "ListInstancesResponse",
416+
"options": {
417+
"(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/instances"
418+
}
419+
},
420+
"GetInstance": {
421+
"requestType": "GetInstanceRequest",
422+
"responseType": "Instance",
423+
"options": {
424+
"(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/instances/*}"
425+
}
426+
},
427+
"CreateInstance": {
428+
"requestType": "CreateInstanceRequest",
429+
"responseType": "google.longrunning.Operation",
430+
"options": {
431+
"(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/instances",
432+
"(google.api.http).body": "instance"
433+
}
434+
},
435+
"UpdateInstance": {
436+
"requestType": "UpdateInstanceRequest",
437+
"responseType": "google.longrunning.Operation",
438+
"options": {
439+
"(google.api.http).patch": "/v1beta1/{instance.name=projects/*/locations/*/instances/*}",
440+
"(google.api.http).body": "instance"
441+
}
442+
},
443+
"ImportInstance": {
444+
"requestType": "ImportInstanceRequest",
445+
"responseType": "google.longrunning.Operation",
446+
"options": {
447+
"(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/instances/*}:import",
448+
"(google.api.http).body": "*"
449+
}
450+
},
451+
"ExportInstance": {
452+
"requestType": "ExportInstanceRequest",
453+
"responseType": "google.longrunning.Operation",
454+
"options": {
455+
"(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/instances/*}:export",
456+
"(google.api.http).body": "*"
457+
}
458+
},
459+
"FailoverInstance": {
460+
"requestType": "FailoverInstanceRequest",
461+
"responseType": "google.longrunning.Operation",
462+
"options": {
463+
"(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/instances/*}:failover",
464+
"(google.api.http).body": "*"
465+
}
466+
},
467+
"DeleteInstance": {
468+
"requestType": "DeleteInstanceRequest",
469+
"responseType": "google.longrunning.Operation",
470+
"options": {
471+
"(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/instances/*}"
472+
}
473+
}
474+
}
475+
},
476+
"Instance": {
477+
"fields": {
478+
"name": {
479+
"type": "string",
480+
"id": 1
481+
},
482+
"displayName": {
483+
"type": "string",
484+
"id": 2
485+
},
486+
"labels": {
487+
"keyType": "string",
488+
"type": "string",
489+
"id": 3
490+
},
491+
"locationId": {
492+
"type": "string",
493+
"id": 4
494+
},
495+
"alternativeLocationId": {
496+
"type": "string",
497+
"id": 5
498+
},
499+
"redisVersion": {
500+
"type": "string",
501+
"id": 7
502+
},
503+
"reservedIpRange": {
504+
"type": "string",
505+
"id": 9
506+
},
507+
"host": {
508+
"type": "string",
509+
"id": 10
510+
},
511+
"port": {
512+
"type": "int32",
513+
"id": 11
514+
},
515+
"currentLocationId": {
516+
"type": "string",
517+
"id": 12
518+
},
519+
"createTime": {
520+
"type": "google.protobuf.Timestamp",
521+
"id": 13
522+
},
523+
"state": {
524+
"type": "State",
525+
"id": 14
526+
},
527+
"statusMessage": {
528+
"type": "string",
529+
"id": 15
530+
},
531+
"redisConfigs": {
532+
"keyType": "string",
533+
"type": "string",
534+
"id": 16
535+
},
536+
"tier": {
537+
"type": "Tier",
538+
"id": 17
539+
},
540+
"memorySizeGb": {
541+
"type": "int32",
542+
"id": 18
543+
},
544+
"authorizedNetwork": {
545+
"type": "string",
546+
"id": 20
547+
},
548+
"persistenceIamIdentity": {
549+
"type": "string",
550+
"id": 21
551+
}
552+
},
553+
"nested": {
554+
"State": {
555+
"values": {
556+
"STATE_UNSPECIFIED": 0,
557+
"CREATING": 1,
558+
"READY": 2,
559+
"UPDATING": 3,
560+
"DELETING": 4,
561+
"REPAIRING": 5,
562+
"MAINTENANCE": 6,
563+
"IMPORTING": 8,
564+
"FAILING_OVER": 10
565+
}
566+
},
567+
"Tier": {
568+
"values": {
569+
"TIER_UNSPECIFIED": 0,
570+
"BASIC": 1,
571+
"STANDARD_HA": 3
572+
}
573+
}
574+
}
575+
},
576+
"ListInstancesRequest": {
577+
"fields": {
578+
"parent": {
579+
"type": "string",
580+
"id": 1
581+
},
582+
"pageSize": {
583+
"type": "int32",
584+
"id": 2
585+
},
586+
"pageToken": {
587+
"type": "string",
588+
"id": 3
589+
}
590+
}
591+
},
592+
"ListInstancesResponse": {
593+
"fields": {
594+
"instances": {
595+
"rule": "repeated",
596+
"type": "Instance",
597+
"id": 1
598+
},
599+
"nextPageToken": {
600+
"type": "string",
601+
"id": 2
602+
},
603+
"unreachable": {
604+
"rule": "repeated",
605+
"type": "string",
606+
"id": 3
607+
}
608+
}
609+
},
610+
"GetInstanceRequest": {
611+
"fields": {
612+
"name": {
613+
"type": "string",
614+
"id": 1
615+
}
616+
}
617+
},
618+
"CreateInstanceRequest": {
619+
"fields": {
620+
"parent": {
621+
"type": "string",
622+
"id": 1
623+
},
624+
"instanceId": {
625+
"type": "string",
626+
"id": 2
627+
},
628+
"instance": {
629+
"type": "Instance",
630+
"id": 3
631+
}
632+
}
633+
},
634+
"UpdateInstanceRequest": {
635+
"fields": {
636+
"updateMask": {
637+
"type": "google.protobuf.FieldMask",
638+
"id": 1
639+
},
640+
"instance": {
641+
"type": "Instance",
642+
"id": 2
643+
}
644+
}
645+
},
646+
"DeleteInstanceRequest": {
647+
"fields": {
648+
"name": {
649+
"type": "string",
650+
"id": 1
651+
}
652+
}
653+
},
654+
"GcsSource": {
655+
"fields": {
656+
"uri": {
657+
"type": "string",
658+
"id": 1
659+
}
660+
}
661+
},
662+
"InputConfig": {
663+
"oneofs": {
664+
"source": {
665+
"oneof": [
666+
"gcsSource"
667+
]
668+
}
669+
},
670+
"fields": {
671+
"gcsSource": {
672+
"type": "GcsSource",
673+
"id": 1
674+
}
675+
}
676+
},
677+
"ImportInstanceRequest": {
678+
"fields": {
679+
"name": {
680+
"type": "string",
681+
"id": 1
682+
},
683+
"inputConfig": {
684+
"type": "InputConfig",
685+
"id": 3
686+
}
687+
}
688+
},
689+
"GcsDestination": {
690+
"fields": {
691+
"uri": {
692+
"type": "string",
693+
"id": 1
694+
}
695+
}
696+
},
697+
"OutputConfig": {
698+
"oneofs": {
699+
"destination": {
700+
"oneof": [
701+
"gcsDestination"
702+
]
703+
}
704+
},
705+
"fields": {
706+
"gcsDestination": {
707+
"type": "GcsDestination",
708+
"id": 1
709+
}
710+
}
711+
},
712+
"ExportInstanceRequest": {
713+
"fields": {
714+
"name": {
715+
"type": "string",
716+
"id": 1
717+
},
718+
"outputConfig": {
719+
"type": "OutputConfig",
720+
"id": 3
721+
}
722+
}
723+
},
724+
"FailoverInstanceRequest": {
725+
"fields": {
726+
"name": {
727+
"type": "string",
728+
"id": 1
729+
},
730+
"dataProtectionMode": {
731+
"type": "DataProtectionMode",
732+
"id": 2
733+
}
734+
},
735+
"nested": {
736+
"DataProtectionMode": {
737+
"values": {
738+
"DATA_PROTECTION_MODE_UNSPECIFIED": 0,
739+
"LIMITED_DATA_LOSS": 1,
740+
"FORCE_DATA_LOSS": 2
741+
}
742+
}
743+
}
744+
},
745+
"LocationMetadata": {
746+
"fields": {
747+
"availableZones": {
748+
"keyType": "string",
749+
"type": "ZoneMetadata",
750+
"id": 1
751+
}
752+
}
753+
},
754+
"ZoneMetadata": {
755+
"fields": {}
756+
}
757+
}
399758
}
400759
}
401760
}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
16+
17+
// Set a flag that we are running in a browser bundle.
18+
global.isBrowser = true;
19+
20+
// Re-export all exports from ./index.js.
21+
module.exports = require('./index');

packages/google-cloud-redis/src/service_proto_list.json

-1
This file was deleted.

0 commit comments

Comments
 (0)