google-apis-networkservices_v1beta1 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -365,6 +365,1316 @@ module Google
365
365
  end
366
366
  end
367
367
 
368
+ # Gateway represents the configuration for a proxy, typically a load balancer.
369
+ # It captures the ip:port over which the services are exposed by the proxy,
370
+ # along with any policy configurations. Routes have reference to to Gateways to
371
+ # dictate how requests should be routed by this Gateway.
372
+ class Gateway
373
+ include Google::Apis::Core::Hashable
374
+
375
+ # Output only. The timestamp when the resource was created.
376
+ # Corresponds to the JSON property `createTime`
377
+ # @return [String]
378
+ attr_accessor :create_time
379
+
380
+ # Optional. A free-text description of the resource. Max length 1024 characters.
381
+ # Corresponds to the JSON property `description`
382
+ # @return [String]
383
+ attr_accessor :description
384
+
385
+ # Optional. Set of label tags associated with the Gateway resource.
386
+ # Corresponds to the JSON property `labels`
387
+ # @return [Hash<String,String>]
388
+ attr_accessor :labels
389
+
390
+ # Required. Name of the Gateway resource. It matches pattern `projects/*/
391
+ # locations/global/gateways/`.
392
+ # Corresponds to the JSON property `name`
393
+ # @return [String]
394
+ attr_accessor :name
395
+
396
+ # Required. One or more ports that the Gateway must receive traffic on. The
397
+ # proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports
398
+ # specified below.
399
+ # Corresponds to the JSON property `ports`
400
+ # @return [Array<Fixnum>]
401
+ attr_accessor :ports
402
+
403
+ # Required. Immutable. Scope determines how configuration across multiple
404
+ # Gateway instances are merged. The configuration for multiple Gateway instances
405
+ # with the same scope will be merged as presented as a single coniguration to
406
+ # the proxy/load balancer. Max length 64 characters. Scope should start with a
407
+ # letter and can only have letters, numbers, hyphens.
408
+ # Corresponds to the JSON property `scope`
409
+ # @return [String]
410
+ attr_accessor :scope
411
+
412
+ # Output only. Server-defined URL of this resource
413
+ # Corresponds to the JSON property `selfLink`
414
+ # @return [String]
415
+ attr_accessor :self_link
416
+
417
+ # Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS
418
+ # traffic is terminated. If empty, TLS termination is disabled.
419
+ # Corresponds to the JSON property `serverTlsPolicy`
420
+ # @return [String]
421
+ attr_accessor :server_tls_policy
422
+
423
+ # Immutable. The type of the customer managed gateway.
424
+ # Corresponds to the JSON property `type`
425
+ # @return [String]
426
+ attr_accessor :type
427
+
428
+ # Output only. The timestamp when the resource was updated.
429
+ # Corresponds to the JSON property `updateTime`
430
+ # @return [String]
431
+ attr_accessor :update_time
432
+
433
+ def initialize(**args)
434
+ update!(**args)
435
+ end
436
+
437
+ # Update properties of this object
438
+ def update!(**args)
439
+ @create_time = args[:create_time] if args.key?(:create_time)
440
+ @description = args[:description] if args.key?(:description)
441
+ @labels = args[:labels] if args.key?(:labels)
442
+ @name = args[:name] if args.key?(:name)
443
+ @ports = args[:ports] if args.key?(:ports)
444
+ @scope = args[:scope] if args.key?(:scope)
445
+ @self_link = args[:self_link] if args.key?(:self_link)
446
+ @server_tls_policy = args[:server_tls_policy] if args.key?(:server_tls_policy)
447
+ @type = args[:type] if args.key?(:type)
448
+ @update_time = args[:update_time] if args.key?(:update_time)
449
+ end
450
+ end
451
+
452
+ # GrpcRoute is the resource defining how gRPC traffic routed by a Mesh or
453
+ # Gateway resource is routed.
454
+ class GrpcRoute
455
+ include Google::Apis::Core::Hashable
456
+
457
+ # Output only. The timestamp when the resource was created.
458
+ # Corresponds to the JSON property `createTime`
459
+ # @return [String]
460
+ attr_accessor :create_time
461
+
462
+ # Optional. A free-text description of the resource. Max length 1024 characters.
463
+ # Corresponds to the JSON property `description`
464
+ # @return [String]
465
+ attr_accessor :description
466
+
467
+ # Optional. Gateways defines a list of gateways this GrpcRoute is attached to,
468
+ # as one of the routing rules to route the requests served by the gateway. Each
469
+ # gateway reference should match the pattern: `projects/*/locations/global/
470
+ # gateways/`
471
+ # Corresponds to the JSON property `gateways`
472
+ # @return [Array<String>]
473
+ attr_accessor :gateways
474
+
475
+ # Required. Service hostnames with an optional port for which this route
476
+ # describes traffic. Format: [:] Hostname is the fully qualified domain name of
477
+ # a network host. This matches the RFC 1123 definition of a hostname with 2
478
+ # notable exceptions: - IPs are not allowed. - A hostname may be prefixed with a
479
+ # wildcard label (*.). The wildcard label must appear by itself as the first
480
+ # label. Hostname can be "precise" which is a domain name without the
481
+ # terminating dot of a network host (e.g. "foo.example.com") or "wildcard",
482
+ # which is a domain name prefixed with a single wildcard label (e.g. *.example.
483
+ # com). Note that as per RFC1035 and RFC1123, a label must consist of lower case
484
+ # alphanumeric characters or '-', and must start and end with an alphanumeric
485
+ # character. No other punctuation is allowed. The routes associated with a Mesh
486
+ # or Gateway must have unique hostnames. If you attempt to attach multiple
487
+ # routes with conflicting hostnames, the configuration will be rejected. For
488
+ # example, while it is acceptable for routes for the hostnames "*.foo.bar.com"
489
+ # and "*.bar.com" to be associated with the same route, it is not possible to
490
+ # associate two routes both with "*.bar.com" or both with "bar.com". If a port
491
+ # is specified, then gRPC clients must use the channel URI with the port to
492
+ # match this rule (i.e. "xds:///service:123"), otherwise they must supply the
493
+ # URI without a port (i.e. "xds:///service").
494
+ # Corresponds to the JSON property `hostnames`
495
+ # @return [Array<String>]
496
+ attr_accessor :hostnames
497
+
498
+ # Optional. Set of label tags associated with the GrpcRoute resource.
499
+ # Corresponds to the JSON property `labels`
500
+ # @return [Hash<String,String>]
501
+ attr_accessor :labels
502
+
503
+ # Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as
504
+ # one of the routing rules to route the requests served by the mesh. Each mesh
505
+ # reference should match the pattern: `projects/*/locations/global/meshes/`
506
+ # Corresponds to the JSON property `meshes`
507
+ # @return [Array<String>]
508
+ attr_accessor :meshes
509
+
510
+ # Required. Name of the GrpcRoute resource. It matches pattern `projects/*/
511
+ # locations/global/grpcRoutes/`
512
+ # Corresponds to the JSON property `name`
513
+ # @return [String]
514
+ attr_accessor :name
515
+
516
+ # Required. A list of detailed rules defining how to route traffic. Within a
517
+ # single GrpcRoute, the GrpcRoute.RouteAction associated with the first matching
518
+ # GrpcRoute.RouteRule will be executed. At least one rule must be supplied.
519
+ # Corresponds to the JSON property `rules`
520
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::GrpcRouteRouteRule>]
521
+ attr_accessor :rules
522
+
523
+ # Output only. Server-defined URL of this resource
524
+ # Corresponds to the JSON property `selfLink`
525
+ # @return [String]
526
+ attr_accessor :self_link
527
+
528
+ # Output only. The timestamp when the resource was updated.
529
+ # Corresponds to the JSON property `updateTime`
530
+ # @return [String]
531
+ attr_accessor :update_time
532
+
533
+ def initialize(**args)
534
+ update!(**args)
535
+ end
536
+
537
+ # Update properties of this object
538
+ def update!(**args)
539
+ @create_time = args[:create_time] if args.key?(:create_time)
540
+ @description = args[:description] if args.key?(:description)
541
+ @gateways = args[:gateways] if args.key?(:gateways)
542
+ @hostnames = args[:hostnames] if args.key?(:hostnames)
543
+ @labels = args[:labels] if args.key?(:labels)
544
+ @meshes = args[:meshes] if args.key?(:meshes)
545
+ @name = args[:name] if args.key?(:name)
546
+ @rules = args[:rules] if args.key?(:rules)
547
+ @self_link = args[:self_link] if args.key?(:self_link)
548
+ @update_time = args[:update_time] if args.key?(:update_time)
549
+ end
550
+ end
551
+
552
+ # The destination to which traffic will be routed.
553
+ class GrpcRouteDestination
554
+ include Google::Apis::Core::Hashable
555
+
556
+ # Required. The URL of a destination service to which to route traffic. Must
557
+ # refer to either a BackendService or ServiceDirectoryService.
558
+ # Corresponds to the JSON property `serviceName`
559
+ # @return [String]
560
+ attr_accessor :service_name
561
+
562
+ # Optional. Specifies the proportion of requests forwarded to the backend
563
+ # referenced by the serviceName field. This is computed as: weight/Sum(weights
564
+ # in this destination list). For non-zero values, there may be some epsilon from
565
+ # the exact proportion defined here depending on the precision an implementation
566
+ # supports. If only one serviceName is specified and it has a weight greater
567
+ # than 0, 100% of the traffic is forwarded to that backend. If weights are
568
+ # specified for any one service name, they need to be specified for all of them.
569
+ # If weights are unspecified for all services, then, traffic is distributed in
570
+ # equal proportions to all of them.
571
+ # Corresponds to the JSON property `weight`
572
+ # @return [Fixnum]
573
+ attr_accessor :weight
574
+
575
+ def initialize(**args)
576
+ update!(**args)
577
+ end
578
+
579
+ # Update properties of this object
580
+ def update!(**args)
581
+ @service_name = args[:service_name] if args.key?(:service_name)
582
+ @weight = args[:weight] if args.key?(:weight)
583
+ end
584
+ end
585
+
586
+ # The specification for fault injection introduced into traffic to test the
587
+ # resiliency of clients to destination service failure. As part of fault
588
+ # injection, when clients send requests to a destination, delays can be
589
+ # introduced on a percentage of requests before sending those requests to the
590
+ # destination service. Similarly requests from clients can be aborted by for a
591
+ # percentage of requests.
592
+ class GrpcRouteFaultInjectionPolicy
593
+ include Google::Apis::Core::Hashable
594
+
595
+ # Specification of how client requests are aborted as part of fault injection
596
+ # before being sent to a destination.
597
+ # Corresponds to the JSON property `abort`
598
+ # @return [Google::Apis::NetworkservicesV1beta1::GrpcRouteFaultInjectionPolicyAbort]
599
+ attr_accessor :abort
600
+
601
+ # Specification of how client requests are delayed as part of fault injection
602
+ # before being sent to a destination.
603
+ # Corresponds to the JSON property `delay`
604
+ # @return [Google::Apis::NetworkservicesV1beta1::GrpcRouteFaultInjectionPolicyDelay]
605
+ attr_accessor :delay
606
+
607
+ def initialize(**args)
608
+ update!(**args)
609
+ end
610
+
611
+ # Update properties of this object
612
+ def update!(**args)
613
+ @abort = args[:abort] if args.key?(:abort)
614
+ @delay = args[:delay] if args.key?(:delay)
615
+ end
616
+ end
617
+
618
+ # Specification of how client requests are aborted as part of fault injection
619
+ # before being sent to a destination.
620
+ class GrpcRouteFaultInjectionPolicyAbort
621
+ include Google::Apis::Core::Hashable
622
+
623
+ # The HTTP status code used to abort the request. The value must be between 200
624
+ # and 599 inclusive.
625
+ # Corresponds to the JSON property `httpStatus`
626
+ # @return [Fixnum]
627
+ attr_accessor :http_status
628
+
629
+ # The percentage of traffic which will be aborted. The value must be between [0,
630
+ # 100]
631
+ # Corresponds to the JSON property `percentage`
632
+ # @return [Fixnum]
633
+ attr_accessor :percentage
634
+
635
+ def initialize(**args)
636
+ update!(**args)
637
+ end
638
+
639
+ # Update properties of this object
640
+ def update!(**args)
641
+ @http_status = args[:http_status] if args.key?(:http_status)
642
+ @percentage = args[:percentage] if args.key?(:percentage)
643
+ end
644
+ end
645
+
646
+ # Specification of how client requests are delayed as part of fault injection
647
+ # before being sent to a destination.
648
+ class GrpcRouteFaultInjectionPolicyDelay
649
+ include Google::Apis::Core::Hashable
650
+
651
+ # Specify a fixed delay before forwarding the request.
652
+ # Corresponds to the JSON property `fixedDelay`
653
+ # @return [String]
654
+ attr_accessor :fixed_delay
655
+
656
+ # The percentage of traffic on which delay will be injected. The value must be
657
+ # between [0, 100]
658
+ # Corresponds to the JSON property `percentage`
659
+ # @return [Fixnum]
660
+ attr_accessor :percentage
661
+
662
+ def initialize(**args)
663
+ update!(**args)
664
+ end
665
+
666
+ # Update properties of this object
667
+ def update!(**args)
668
+ @fixed_delay = args[:fixed_delay] if args.key?(:fixed_delay)
669
+ @percentage = args[:percentage] if args.key?(:percentage)
670
+ end
671
+ end
672
+
673
+ # A match against a collection of headers.
674
+ class GrpcRouteHeaderMatch
675
+ include Google::Apis::Core::Hashable
676
+
677
+ # Required. The key of the header.
678
+ # Corresponds to the JSON property `key`
679
+ # @return [String]
680
+ attr_accessor :key
681
+
682
+ # Optional. Specifies how to match against the value of the header. If not
683
+ # specified, a default value of EXACT is used.
684
+ # Corresponds to the JSON property `type`
685
+ # @return [String]
686
+ attr_accessor :type
687
+
688
+ # Required. The value of the header.
689
+ # Corresponds to the JSON property `value`
690
+ # @return [String]
691
+ attr_accessor :value
692
+
693
+ def initialize(**args)
694
+ update!(**args)
695
+ end
696
+
697
+ # Update properties of this object
698
+ def update!(**args)
699
+ @key = args[:key] if args.key?(:key)
700
+ @type = args[:type] if args.key?(:type)
701
+ @value = args[:value] if args.key?(:value)
702
+ end
703
+ end
704
+
705
+ # Specifies a match against a method.
706
+ class GrpcRouteMethodMatch
707
+ include Google::Apis::Core::Hashable
708
+
709
+ # Optional. Specifies that matches are case sensitive. The default value is true.
710
+ # case_sensitive must not be used with a type of REGULAR_EXPRESSION.
711
+ # Corresponds to the JSON property `caseSensitive`
712
+ # @return [Boolean]
713
+ attr_accessor :case_sensitive
714
+ alias_method :case_sensitive?, :case_sensitive
715
+
716
+ # Required. Name of the method to match against. If unspecified, will match all
717
+ # methods.
718
+ # Corresponds to the JSON property `grpcMethod`
719
+ # @return [String]
720
+ attr_accessor :grpc_method
721
+
722
+ # Required. Name of the service to match against. If unspecified, will match all
723
+ # services.
724
+ # Corresponds to the JSON property `grpcService`
725
+ # @return [String]
726
+ attr_accessor :grpc_service
727
+
728
+ # Optional. Specifies how to match against the name. If not specified, a default
729
+ # value of "EXACT" is used.
730
+ # Corresponds to the JSON property `type`
731
+ # @return [String]
732
+ attr_accessor :type
733
+
734
+ def initialize(**args)
735
+ update!(**args)
736
+ end
737
+
738
+ # Update properties of this object
739
+ def update!(**args)
740
+ @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
741
+ @grpc_method = args[:grpc_method] if args.key?(:grpc_method)
742
+ @grpc_service = args[:grpc_service] if args.key?(:grpc_service)
743
+ @type = args[:type] if args.key?(:type)
744
+ end
745
+ end
746
+
747
+ # The specifications for retries.
748
+ class GrpcRouteRetryPolicy
749
+ include Google::Apis::Core::Hashable
750
+
751
+ # Specifies the allowed number of retries. This number must be > 0. If not
752
+ # specpfied, default to 1.
753
+ # Corresponds to the JSON property `numRetries`
754
+ # @return [Fixnum]
755
+ attr_accessor :num_retries
756
+
757
+ # - connect-failure: Router will retry on failures connecting to Backend
758
+ # Services, for example due to connection timeouts. - refused-stream: Router
759
+ # will retry if the backend service resets the stream with a REFUSED_STREAM
760
+ # error code. This reset type indicates that it is safe to retry. - cancelled:
761
+ # Router will retry if the gRPC status code in the response header is set to
762
+ # cancelled - deadline-exceeded: Router will retry if the gRPC status code in
763
+ # the response header is set to deadline-exceeded - resource-exhausted: Router
764
+ # will retry if the gRPC status code in the response header is set to resource-
765
+ # exhausted - unavailable: Router will retry if the gRPC status code in the
766
+ # response header is set to unavailable
767
+ # Corresponds to the JSON property `retryConditions`
768
+ # @return [Array<String>]
769
+ attr_accessor :retry_conditions
770
+
771
+ def initialize(**args)
772
+ update!(**args)
773
+ end
774
+
775
+ # Update properties of this object
776
+ def update!(**args)
777
+ @num_retries = args[:num_retries] if args.key?(:num_retries)
778
+ @retry_conditions = args[:retry_conditions] if args.key?(:retry_conditions)
779
+ end
780
+ end
781
+
782
+ # Specifies how to route matched traffic.
783
+ class GrpcRouteRouteAction
784
+ include Google::Apis::Core::Hashable
785
+
786
+ # Optional. The destination services to which traffic should be forwarded. If
787
+ # multiple destinations are specified, traffic will be split between Backend
788
+ # Service(s) according to the weight field of these destinations.
789
+ # Corresponds to the JSON property `destinations`
790
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::GrpcRouteDestination>]
791
+ attr_accessor :destinations
792
+
793
+ # The specification for fault injection introduced into traffic to test the
794
+ # resiliency of clients to destination service failure. As part of fault
795
+ # injection, when clients send requests to a destination, delays can be
796
+ # introduced on a percentage of requests before sending those requests to the
797
+ # destination service. Similarly requests from clients can be aborted by for a
798
+ # percentage of requests.
799
+ # Corresponds to the JSON property `faultInjectionPolicy`
800
+ # @return [Google::Apis::NetworkservicesV1beta1::GrpcRouteFaultInjectionPolicy]
801
+ attr_accessor :fault_injection_policy
802
+
803
+ # The specifications for retries.
804
+ # Corresponds to the JSON property `retryPolicy`
805
+ # @return [Google::Apis::NetworkservicesV1beta1::GrpcRouteRetryPolicy]
806
+ attr_accessor :retry_policy
807
+
808
+ # Optional. Specifies the timeout for selected route. Timeout is computed from
809
+ # the time the request has been fully processed (i.e. end of stream) up until
810
+ # the response has been completely processed. Timeout includes all retries.
811
+ # Corresponds to the JSON property `timeout`
812
+ # @return [String]
813
+ attr_accessor :timeout
814
+
815
+ def initialize(**args)
816
+ update!(**args)
817
+ end
818
+
819
+ # Update properties of this object
820
+ def update!(**args)
821
+ @destinations = args[:destinations] if args.key?(:destinations)
822
+ @fault_injection_policy = args[:fault_injection_policy] if args.key?(:fault_injection_policy)
823
+ @retry_policy = args[:retry_policy] if args.key?(:retry_policy)
824
+ @timeout = args[:timeout] if args.key?(:timeout)
825
+ end
826
+ end
827
+
828
+ # Criteria for matching traffic. A RouteMatch will be considered to match when
829
+ # all supplied fields match.
830
+ class GrpcRouteRouteMatch
831
+ include Google::Apis::Core::Hashable
832
+
833
+ # Optional. Specifies a collection of headers to match.
834
+ # Corresponds to the JSON property `headers`
835
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::GrpcRouteHeaderMatch>]
836
+ attr_accessor :headers
837
+
838
+ # Specifies a match against a method.
839
+ # Corresponds to the JSON property `method`
840
+ # @return [Google::Apis::NetworkservicesV1beta1::GrpcRouteMethodMatch]
841
+ attr_accessor :method_prop
842
+
843
+ def initialize(**args)
844
+ update!(**args)
845
+ end
846
+
847
+ # Update properties of this object
848
+ def update!(**args)
849
+ @headers = args[:headers] if args.key?(:headers)
850
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
851
+ end
852
+ end
853
+
854
+ # Describes how to route traffic.
855
+ class GrpcRouteRouteRule
856
+ include Google::Apis::Core::Hashable
857
+
858
+ # Specifies how to route matched traffic.
859
+ # Corresponds to the JSON property `action`
860
+ # @return [Google::Apis::NetworkservicesV1beta1::GrpcRouteRouteAction]
861
+ attr_accessor :action
862
+
863
+ # Optional. Matches define conditions used for matching the rule against
864
+ # incoming gRPC requests. Each match is independent, i.e. this rule will be
865
+ # matched if ANY one of the matches is satisfied. If no matches field is
866
+ # specified, this rule will unconditionally match traffic.
867
+ # Corresponds to the JSON property `matches`
868
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::GrpcRouteRouteMatch>]
869
+ attr_accessor :matches
870
+
871
+ def initialize(**args)
872
+ update!(**args)
873
+ end
874
+
875
+ # Update properties of this object
876
+ def update!(**args)
877
+ @action = args[:action] if args.key?(:action)
878
+ @matches = args[:matches] if args.key?(:matches)
879
+ end
880
+ end
881
+
882
+ # HttpRoute is the resource defining how HTTP traffic should be routed by a Mesh
883
+ # or Gateway resource.
884
+ class HttpRoute
885
+ include Google::Apis::Core::Hashable
886
+
887
+ # Output only. The timestamp when the resource was created.
888
+ # Corresponds to the JSON property `createTime`
889
+ # @return [String]
890
+ attr_accessor :create_time
891
+
892
+ # Optional. A free-text description of the resource. Max length 1024 characters.
893
+ # Corresponds to the JSON property `description`
894
+ # @return [String]
895
+ attr_accessor :description
896
+
897
+ # Optional. Gateways defines a list of gateways this HttpRoute is attached to,
898
+ # as one of the routing rules to route the requests served by the gateway. Each
899
+ # gateway reference should match the pattern: `projects/*/locations/global/
900
+ # gateways/`
901
+ # Corresponds to the JSON property `gateways`
902
+ # @return [Array<String>]
903
+ attr_accessor :gateways
904
+
905
+ # Required. Hostnames define a set of hosts that should match against the HTTP
906
+ # host header to select a HttpRoute to process the request. Hostname is the
907
+ # fully qualified domain name of a network host, as defined by RFC 1123 with the
908
+ # exception that: - IPs are not allowed. - A hostname may be prefixed with a
909
+ # wildcard label (*.). The wildcard label must appear by itself as the first
910
+ # label. Hostname can be "precise" which is a domain name without the
911
+ # terminating dot of a network host (e.g. "foo.example.com") or "wildcard",
912
+ # which is a domain name prefixed with a single wildcard label (e.g. *.example.
913
+ # com). Note that as per RFC1035 and RFC1123, a label must consist of lower case
914
+ # alphanumeric characters or '-', and must start and end with an alphanumeric
915
+ # character. No other punctuation is allowed. The routes associated with a Mesh
916
+ # or Gateways must have unique hostnames. If you attempt to attach multiple
917
+ # routes with conflicting hostnames, the configuration will be rejected. For
918
+ # example, while it is acceptable for routes for the hostnames "*.foo.bar.com"
919
+ # and "*.bar.com" to be associated with the same Mesh (or Gateways under the
920
+ # same scope), it is not possible to associate two routes both with "*.bar.com"
921
+ # or both with "bar.com".
922
+ # Corresponds to the JSON property `hostnames`
923
+ # @return [Array<String>]
924
+ attr_accessor :hostnames
925
+
926
+ # Optional. Set of label tags associated with the HttpRoute resource.
927
+ # Corresponds to the JSON property `labels`
928
+ # @return [Hash<String,String>]
929
+ attr_accessor :labels
930
+
931
+ # Optional. Meshes defines a list of meshes this HttpRoute is attached to, as
932
+ # one of the routing rules to route the requests served by the mesh. Each mesh
933
+ # reference should match the pattern: `projects/*/locations/global/meshes/` The
934
+ # attached Mesh should be of a type SIDECAR
935
+ # Corresponds to the JSON property `meshes`
936
+ # @return [Array<String>]
937
+ attr_accessor :meshes
938
+
939
+ # Required. Name of the HttpRoute resource. It matches pattern `projects/*/
940
+ # locations/global/httpRoutes/http_route_name>`.
941
+ # Corresponds to the JSON property `name`
942
+ # @return [String]
943
+ attr_accessor :name
944
+
945
+ # Required. Rules that define how traffic is routed and handled. Rules will be
946
+ # matched sequentially based on the RouteMatch specified for the rule.
947
+ # Corresponds to the JSON property `rules`
948
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::HttpRouteRouteRule>]
949
+ attr_accessor :rules
950
+
951
+ # Output only. Server-defined URL of this resource
952
+ # Corresponds to the JSON property `selfLink`
953
+ # @return [String]
954
+ attr_accessor :self_link
955
+
956
+ # Output only. The timestamp when the resource was updated.
957
+ # Corresponds to the JSON property `updateTime`
958
+ # @return [String]
959
+ attr_accessor :update_time
960
+
961
+ def initialize(**args)
962
+ update!(**args)
963
+ end
964
+
965
+ # Update properties of this object
966
+ def update!(**args)
967
+ @create_time = args[:create_time] if args.key?(:create_time)
968
+ @description = args[:description] if args.key?(:description)
969
+ @gateways = args[:gateways] if args.key?(:gateways)
970
+ @hostnames = args[:hostnames] if args.key?(:hostnames)
971
+ @labels = args[:labels] if args.key?(:labels)
972
+ @meshes = args[:meshes] if args.key?(:meshes)
973
+ @name = args[:name] if args.key?(:name)
974
+ @rules = args[:rules] if args.key?(:rules)
975
+ @self_link = args[:self_link] if args.key?(:self_link)
976
+ @update_time = args[:update_time] if args.key?(:update_time)
977
+ end
978
+ end
979
+
980
+ # The Specification for allowing client side cross-origin requests.
981
+ class HttpRouteCorsPolicy
982
+ include Google::Apis::Core::Hashable
983
+
984
+ # In response to a preflight request, setting this to true indicates that the
985
+ # actual request can include user credentials. This translates to the Access-
986
+ # Control-Allow-Credentials header. Default value is false.
987
+ # Corresponds to the JSON property `allowCredentials`
988
+ # @return [Boolean]
989
+ attr_accessor :allow_credentials
990
+ alias_method :allow_credentials?, :allow_credentials
991
+
992
+ # Specifies the content for Access-Control-Allow-Headers header.
993
+ # Corresponds to the JSON property `allowHeaders`
994
+ # @return [Array<String>]
995
+ attr_accessor :allow_headers
996
+
997
+ # Specifies the content for Access-Control-Allow-Methods header.
998
+ # Corresponds to the JSON property `allowMethods`
999
+ # @return [Array<String>]
1000
+ attr_accessor :allow_methods
1001
+
1002
+ # Specifies the regular expression patterns that match allowed origins. For
1003
+ # regular expression grammar, please see https://github.com/google/re2/wiki/
1004
+ # Syntax.
1005
+ # Corresponds to the JSON property `allowOriginRegexes`
1006
+ # @return [Array<String>]
1007
+ attr_accessor :allow_origin_regexes
1008
+
1009
+ # Specifies the list of origins that will be allowed to do CORS requests. An
1010
+ # origin is allowed if it matches either an item in allow_origins or an item in
1011
+ # allow_origin_regexes.
1012
+ # Corresponds to the JSON property `allowOrigins`
1013
+ # @return [Array<String>]
1014
+ attr_accessor :allow_origins
1015
+
1016
+ # If true, the CORS policy is disabled. The default value is false, which
1017
+ # indicates that the CORS policy is in effect.
1018
+ # Corresponds to the JSON property `disabled`
1019
+ # @return [Boolean]
1020
+ attr_accessor :disabled
1021
+ alias_method :disabled?, :disabled
1022
+
1023
+ # Specifies the content for Access-Control-Expose-Headers header.
1024
+ # Corresponds to the JSON property `exposeHeaders`
1025
+ # @return [Array<String>]
1026
+ attr_accessor :expose_headers
1027
+
1028
+ # Specifies how long result of a preflight request can be cached in seconds.
1029
+ # This translates to the Access-Control-Max-Age header.
1030
+ # Corresponds to the JSON property `maxAge`
1031
+ # @return [String]
1032
+ attr_accessor :max_age
1033
+
1034
+ def initialize(**args)
1035
+ update!(**args)
1036
+ end
1037
+
1038
+ # Update properties of this object
1039
+ def update!(**args)
1040
+ @allow_credentials = args[:allow_credentials] if args.key?(:allow_credentials)
1041
+ @allow_headers = args[:allow_headers] if args.key?(:allow_headers)
1042
+ @allow_methods = args[:allow_methods] if args.key?(:allow_methods)
1043
+ @allow_origin_regexes = args[:allow_origin_regexes] if args.key?(:allow_origin_regexes)
1044
+ @allow_origins = args[:allow_origins] if args.key?(:allow_origins)
1045
+ @disabled = args[:disabled] if args.key?(:disabled)
1046
+ @expose_headers = args[:expose_headers] if args.key?(:expose_headers)
1047
+ @max_age = args[:max_age] if args.key?(:max_age)
1048
+ end
1049
+ end
1050
+
1051
+ # Specifications of a destination to which the request should be routed to.
1052
+ class HttpRouteDestination
1053
+ include Google::Apis::Core::Hashable
1054
+
1055
+ # The URL of a BackendService to route traffic to.
1056
+ # Corresponds to the JSON property `serviceName`
1057
+ # @return [String]
1058
+ attr_accessor :service_name
1059
+
1060
+ # Specifies the proportion of requests forwarded to the backend referenced by
1061
+ # the serviceName field. This is computed as: weight/Sum(weights in this
1062
+ # destination list). For non-zero values, there may be some epsilon from the
1063
+ # exact proportion defined here depending on the precision an implementation
1064
+ # supports. If only one serviceName is specified and it has a weight greater
1065
+ # than 0, 100% of the traffic is forwarded to that backend. If weights are
1066
+ # specified for any one service name, they need to be specified for all of them.
1067
+ # If weights are unspecified for all services, then, traffic is distributed in
1068
+ # equal proportions to all of them.
1069
+ # Corresponds to the JSON property `weight`
1070
+ # @return [Fixnum]
1071
+ attr_accessor :weight
1072
+
1073
+ def initialize(**args)
1074
+ update!(**args)
1075
+ end
1076
+
1077
+ # Update properties of this object
1078
+ def update!(**args)
1079
+ @service_name = args[:service_name] if args.key?(:service_name)
1080
+ @weight = args[:weight] if args.key?(:weight)
1081
+ end
1082
+ end
1083
+
1084
+ # The specification for fault injection introduced into traffic to test the
1085
+ # resiliency of clients to destination service failure. As part of fault
1086
+ # injection, when clients send requests to a destination, delays can be
1087
+ # introduced by client proxy on a percentage of requests before sending those
1088
+ # requests to the destination service. Similarly requests can be aborted by
1089
+ # client proxy for a percentage of requests.
1090
+ class HttpRouteFaultInjectionPolicy
1091
+ include Google::Apis::Core::Hashable
1092
+
1093
+ # Specification of how client requests are aborted as part of fault injection
1094
+ # before being sent to a destination.
1095
+ # Corresponds to the JSON property `abort`
1096
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteFaultInjectionPolicyAbort]
1097
+ attr_accessor :abort
1098
+
1099
+ # Specification of how client requests are delayed as part of fault injection
1100
+ # before being sent to a destination.
1101
+ # Corresponds to the JSON property `delay`
1102
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteFaultInjectionPolicyDelay]
1103
+ attr_accessor :delay
1104
+
1105
+ def initialize(**args)
1106
+ update!(**args)
1107
+ end
1108
+
1109
+ # Update properties of this object
1110
+ def update!(**args)
1111
+ @abort = args[:abort] if args.key?(:abort)
1112
+ @delay = args[:delay] if args.key?(:delay)
1113
+ end
1114
+ end
1115
+
1116
+ # Specification of how client requests are aborted as part of fault injection
1117
+ # before being sent to a destination.
1118
+ class HttpRouteFaultInjectionPolicyAbort
1119
+ include Google::Apis::Core::Hashable
1120
+
1121
+ # The HTTP status code used to abort the request. The value must be between 200
1122
+ # and 599 inclusive.
1123
+ # Corresponds to the JSON property `httpStatus`
1124
+ # @return [Fixnum]
1125
+ attr_accessor :http_status
1126
+
1127
+ # The percentage of traffic which will be aborted. The value must be between [0,
1128
+ # 100]
1129
+ # Corresponds to the JSON property `percentage`
1130
+ # @return [Fixnum]
1131
+ attr_accessor :percentage
1132
+
1133
+ def initialize(**args)
1134
+ update!(**args)
1135
+ end
1136
+
1137
+ # Update properties of this object
1138
+ def update!(**args)
1139
+ @http_status = args[:http_status] if args.key?(:http_status)
1140
+ @percentage = args[:percentage] if args.key?(:percentage)
1141
+ end
1142
+ end
1143
+
1144
+ # Specification of how client requests are delayed as part of fault injection
1145
+ # before being sent to a destination.
1146
+ class HttpRouteFaultInjectionPolicyDelay
1147
+ include Google::Apis::Core::Hashable
1148
+
1149
+ # Specify a fixed delay before forwarding the request.
1150
+ # Corresponds to the JSON property `fixedDelay`
1151
+ # @return [String]
1152
+ attr_accessor :fixed_delay
1153
+
1154
+ # The percentage of traffic on which delay will be injected. The value must be
1155
+ # between [0, 100]
1156
+ # Corresponds to the JSON property `percentage`
1157
+ # @return [Fixnum]
1158
+ attr_accessor :percentage
1159
+
1160
+ def initialize(**args)
1161
+ update!(**args)
1162
+ end
1163
+
1164
+ # Update properties of this object
1165
+ def update!(**args)
1166
+ @fixed_delay = args[:fixed_delay] if args.key?(:fixed_delay)
1167
+ @percentage = args[:percentage] if args.key?(:percentage)
1168
+ end
1169
+ end
1170
+
1171
+ # Specifies how to select a route rule based on HTTP request headers.
1172
+ class HttpRouteHeaderMatch
1173
+ include Google::Apis::Core::Hashable
1174
+
1175
+ # The value of the header should match exactly the content of exact_match.
1176
+ # Corresponds to the JSON property `exactMatch`
1177
+ # @return [String]
1178
+ attr_accessor :exact_match
1179
+
1180
+ # The name of the HTTP header to match against.
1181
+ # Corresponds to the JSON property `header`
1182
+ # @return [String]
1183
+ attr_accessor :header
1184
+
1185
+ # If specified, the match result will be inverted before checking. Default value
1186
+ # is set to false.
1187
+ # Corresponds to the JSON property `invertMatch`
1188
+ # @return [Boolean]
1189
+ attr_accessor :invert_match
1190
+ alias_method :invert_match?, :invert_match
1191
+
1192
+ # The value of the header must start with the contents of prefix_match.
1193
+ # Corresponds to the JSON property `prefixMatch`
1194
+ # @return [String]
1195
+ attr_accessor :prefix_match
1196
+
1197
+ # A header with header_name must exist. The match takes place whether or not the
1198
+ # header has a value.
1199
+ # Corresponds to the JSON property `presentMatch`
1200
+ # @return [Boolean]
1201
+ attr_accessor :present_match
1202
+ alias_method :present_match?, :present_match
1203
+
1204
+ # Represents an integer value range.
1205
+ # Corresponds to the JSON property `rangeMatch`
1206
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteHeaderMatchIntegerRange]
1207
+ attr_accessor :range_match
1208
+
1209
+ # The value of the header must match the regular expression specified in
1210
+ # regex_match. For regular expression grammar, please see: https://github.com/
1211
+ # google/re2/wiki/Syntax
1212
+ # Corresponds to the JSON property `regexMatch`
1213
+ # @return [String]
1214
+ attr_accessor :regex_match
1215
+
1216
+ # The value of the header must end with the contents of suffix_match.
1217
+ # Corresponds to the JSON property `suffixMatch`
1218
+ # @return [String]
1219
+ attr_accessor :suffix_match
1220
+
1221
+ def initialize(**args)
1222
+ update!(**args)
1223
+ end
1224
+
1225
+ # Update properties of this object
1226
+ def update!(**args)
1227
+ @exact_match = args[:exact_match] if args.key?(:exact_match)
1228
+ @header = args[:header] if args.key?(:header)
1229
+ @invert_match = args[:invert_match] if args.key?(:invert_match)
1230
+ @prefix_match = args[:prefix_match] if args.key?(:prefix_match)
1231
+ @present_match = args[:present_match] if args.key?(:present_match)
1232
+ @range_match = args[:range_match] if args.key?(:range_match)
1233
+ @regex_match = args[:regex_match] if args.key?(:regex_match)
1234
+ @suffix_match = args[:suffix_match] if args.key?(:suffix_match)
1235
+ end
1236
+ end
1237
+
1238
+ # Represents an integer value range.
1239
+ class HttpRouteHeaderMatchIntegerRange
1240
+ include Google::Apis::Core::Hashable
1241
+
1242
+ # End of the range (exclusive)
1243
+ # Corresponds to the JSON property `end`
1244
+ # @return [Fixnum]
1245
+ attr_accessor :end
1246
+
1247
+ # Start of the range (inclusive)
1248
+ # Corresponds to the JSON property `start`
1249
+ # @return [Fixnum]
1250
+ attr_accessor :start
1251
+
1252
+ def initialize(**args)
1253
+ update!(**args)
1254
+ end
1255
+
1256
+ # Update properties of this object
1257
+ def update!(**args)
1258
+ @end = args[:end] if args.key?(:end)
1259
+ @start = args[:start] if args.key?(:start)
1260
+ end
1261
+ end
1262
+
1263
+ # The specification for modifying HTTP header in HTTP request and HTTP response.
1264
+ class HttpRouteHeaderModifier
1265
+ include Google::Apis::Core::Hashable
1266
+
1267
+ # Add the headers with given map where key is the name of the header, value is
1268
+ # the value of the header.
1269
+ # Corresponds to the JSON property `add`
1270
+ # @return [Hash<String,String>]
1271
+ attr_accessor :add
1272
+
1273
+ # Remove headers (matching by header names) specified in the list.
1274
+ # Corresponds to the JSON property `remove`
1275
+ # @return [Array<String>]
1276
+ attr_accessor :remove
1277
+
1278
+ # Completely overwrite/replace the headers with given map where key is the name
1279
+ # of the header, value is the value of the header.
1280
+ # Corresponds to the JSON property `set`
1281
+ # @return [Hash<String,String>]
1282
+ attr_accessor :set
1283
+
1284
+ def initialize(**args)
1285
+ update!(**args)
1286
+ end
1287
+
1288
+ # Update properties of this object
1289
+ def update!(**args)
1290
+ @add = args[:add] if args.key?(:add)
1291
+ @remove = args[:remove] if args.key?(:remove)
1292
+ @set = args[:set] if args.key?(:set)
1293
+ end
1294
+ end
1295
+
1296
+ # Specifications to match a query parameter in the request.
1297
+ class HttpRouteQueryParameterMatch
1298
+ include Google::Apis::Core::Hashable
1299
+
1300
+ # The value of the query parameter must exactly match the contents of
1301
+ # exact_match. Only one of exact_match, regex_match, or present_match must be
1302
+ # set.
1303
+ # Corresponds to the JSON property `exactMatch`
1304
+ # @return [String]
1305
+ attr_accessor :exact_match
1306
+
1307
+ # Specifies that the QueryParameterMatcher matches if request contains query
1308
+ # parameter, irrespective of whether the parameter has a value or not. Only one
1309
+ # of exact_match, regex_match, or present_match must be set.
1310
+ # Corresponds to the JSON property `presentMatch`
1311
+ # @return [Boolean]
1312
+ attr_accessor :present_match
1313
+ alias_method :present_match?, :present_match
1314
+
1315
+ # The name of the query parameter to match.
1316
+ # Corresponds to the JSON property `queryParameter`
1317
+ # @return [String]
1318
+ attr_accessor :query_parameter
1319
+
1320
+ # The value of the query parameter must match the regular expression specified
1321
+ # by regex_match. For regular expression grammar, please see https://github.com/
1322
+ # google/re2/wiki/Syntax Only one of exact_match, regex_match, or present_match
1323
+ # must be set.
1324
+ # Corresponds to the JSON property `regexMatch`
1325
+ # @return [String]
1326
+ attr_accessor :regex_match
1327
+
1328
+ def initialize(**args)
1329
+ update!(**args)
1330
+ end
1331
+
1332
+ # Update properties of this object
1333
+ def update!(**args)
1334
+ @exact_match = args[:exact_match] if args.key?(:exact_match)
1335
+ @present_match = args[:present_match] if args.key?(:present_match)
1336
+ @query_parameter = args[:query_parameter] if args.key?(:query_parameter)
1337
+ @regex_match = args[:regex_match] if args.key?(:regex_match)
1338
+ end
1339
+ end
1340
+
1341
+ # The specification for redirecting traffic.
1342
+ class HttpRouteRedirect
1343
+ include Google::Apis::Core::Hashable
1344
+
1345
+ # The host that will be used in the redirect response instead of the one that
1346
+ # was supplied in the request.
1347
+ # Corresponds to the JSON property `hostRedirect`
1348
+ # @return [String]
1349
+ attr_accessor :host_redirect
1350
+
1351
+ # If set to true, the URL scheme in the redirected request is set to https. If
1352
+ # set to false, the URL scheme of the redirected request will remain the same as
1353
+ # that of the request. The default is set to false.
1354
+ # Corresponds to the JSON property `httpsRedirect`
1355
+ # @return [Boolean]
1356
+ attr_accessor :https_redirect
1357
+ alias_method :https_redirect?, :https_redirect
1358
+
1359
+ # The path that will be used in the redirect response instead of the one that
1360
+ # was supplied in the request. path_redirect can not be supplied together with
1361
+ # prefix_redirect. Supply one alone or neither. If neither is supplied, the path
1362
+ # of the original request will be used for the redirect.
1363
+ # Corresponds to the JSON property `pathRedirect`
1364
+ # @return [String]
1365
+ attr_accessor :path_redirect
1366
+
1367
+ # The port that will be used in the redirected request instead of the one that
1368
+ # was supplied in the request.
1369
+ # Corresponds to the JSON property `portRedirect`
1370
+ # @return [Fixnum]
1371
+ attr_accessor :port_redirect
1372
+
1373
+ # Indicates that during redirection, the matched prefix (or path) should be
1374
+ # swapped with this value. This option allows URLs be dynamically created based
1375
+ # on the request.
1376
+ # Corresponds to the JSON property `prefixRewrite`
1377
+ # @return [String]
1378
+ attr_accessor :prefix_rewrite
1379
+
1380
+ # The HTTP Status code to use for the redirect.
1381
+ # Corresponds to the JSON property `responseCode`
1382
+ # @return [String]
1383
+ attr_accessor :response_code
1384
+
1385
+ # if set to true, any accompanying query portion of the original URL is removed
1386
+ # prior to redirecting the request. If set to false, the query portion of the
1387
+ # original URL is retained. The default is set to false.
1388
+ # Corresponds to the JSON property `stripQuery`
1389
+ # @return [Boolean]
1390
+ attr_accessor :strip_query
1391
+ alias_method :strip_query?, :strip_query
1392
+
1393
+ def initialize(**args)
1394
+ update!(**args)
1395
+ end
1396
+
1397
+ # Update properties of this object
1398
+ def update!(**args)
1399
+ @host_redirect = args[:host_redirect] if args.key?(:host_redirect)
1400
+ @https_redirect = args[:https_redirect] if args.key?(:https_redirect)
1401
+ @path_redirect = args[:path_redirect] if args.key?(:path_redirect)
1402
+ @port_redirect = args[:port_redirect] if args.key?(:port_redirect)
1403
+ @prefix_rewrite = args[:prefix_rewrite] if args.key?(:prefix_rewrite)
1404
+ @response_code = args[:response_code] if args.key?(:response_code)
1405
+ @strip_query = args[:strip_query] if args.key?(:strip_query)
1406
+ end
1407
+ end
1408
+
1409
+ # Specifies the policy on how requests are shadowed to a separate mirrored
1410
+ # destination service. The proxy does not wait for responses from the shadow
1411
+ # service. Prior to sending traffic to the shadow service, the host/authority
1412
+ # header is suffixed with -shadow.
1413
+ class HttpRouteRequestMirrorPolicy
1414
+ include Google::Apis::Core::Hashable
1415
+
1416
+ # Specifications of a destination to which the request should be routed to.
1417
+ # Corresponds to the JSON property `destination`
1418
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteDestination]
1419
+ attr_accessor :destination
1420
+
1421
+ def initialize(**args)
1422
+ update!(**args)
1423
+ end
1424
+
1425
+ # Update properties of this object
1426
+ def update!(**args)
1427
+ @destination = args[:destination] if args.key?(:destination)
1428
+ end
1429
+ end
1430
+
1431
+ # The specifications for retries.
1432
+ class HttpRouteRetryPolicy
1433
+ include Google::Apis::Core::Hashable
1434
+
1435
+ # Specifies the allowed number of retries. This number must be > 0. If not
1436
+ # specified, default to 1.
1437
+ # Corresponds to the JSON property `numRetries`
1438
+ # @return [Fixnum]
1439
+ attr_accessor :num_retries
1440
+
1441
+ # Specifies a non-zero timeout per retry attempt.
1442
+ # Corresponds to the JSON property `perTryTimeout`
1443
+ # @return [String]
1444
+ attr_accessor :per_try_timeout
1445
+
1446
+ # Specifies one or more conditions when this retry policy applies. Valid values
1447
+ # are: 5xx: Proxy will attempt a retry if the destination service responds with
1448
+ # any 5xx response code, of if the destination service does not respond at all,
1449
+ # example: disconnect, reset, read timeout, connection failure and refused
1450
+ # streams. gateway-error: Similar to 5xx, but only applies to response codes 502,
1451
+ # 503, 504. reset: Proxy will attempt a retry if the destination service does
1452
+ # not respond at all (disconnect/reset/read timeout) connect-failure: Proxy will
1453
+ # retry on failures connecting to destination for example due to connection
1454
+ # timeouts. retriable-4xx: Proxy will retry fro retriable 4xx response codes.
1455
+ # Currently the only retriable error supported is 409. refused-stream: Proxy
1456
+ # will retry if the destination resets the stream with a REFUSED_STREAM error
1457
+ # code. This reset type indicates that it is safe to retry.
1458
+ # Corresponds to the JSON property `retryConditions`
1459
+ # @return [Array<String>]
1460
+ attr_accessor :retry_conditions
1461
+
1462
+ def initialize(**args)
1463
+ update!(**args)
1464
+ end
1465
+
1466
+ # Update properties of this object
1467
+ def update!(**args)
1468
+ @num_retries = args[:num_retries] if args.key?(:num_retries)
1469
+ @per_try_timeout = args[:per_try_timeout] if args.key?(:per_try_timeout)
1470
+ @retry_conditions = args[:retry_conditions] if args.key?(:retry_conditions)
1471
+ end
1472
+ end
1473
+
1474
+ # The specifications for routing traffic and applying associated policies.
1475
+ class HttpRouteRouteAction
1476
+ include Google::Apis::Core::Hashable
1477
+
1478
+ # The Specification for allowing client side cross-origin requests.
1479
+ # Corresponds to the JSON property `corsPolicy`
1480
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteCorsPolicy]
1481
+ attr_accessor :cors_policy
1482
+
1483
+ # The destination to which traffic should be forwarded.
1484
+ # Corresponds to the JSON property `destinations`
1485
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::HttpRouteDestination>]
1486
+ attr_accessor :destinations
1487
+
1488
+ # The specification for fault injection introduced into traffic to test the
1489
+ # resiliency of clients to destination service failure. As part of fault
1490
+ # injection, when clients send requests to a destination, delays can be
1491
+ # introduced by client proxy on a percentage of requests before sending those
1492
+ # requests to the destination service. Similarly requests can be aborted by
1493
+ # client proxy for a percentage of requests.
1494
+ # Corresponds to the JSON property `faultInjectionPolicy`
1495
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteFaultInjectionPolicy]
1496
+ attr_accessor :fault_injection_policy
1497
+
1498
+ # The specification for redirecting traffic.
1499
+ # Corresponds to the JSON property `redirect`
1500
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteRedirect]
1501
+ attr_accessor :redirect
1502
+
1503
+ # The specification for modifying HTTP header in HTTP request and HTTP response.
1504
+ # Corresponds to the JSON property `requestHeaderModifier`
1505
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteHeaderModifier]
1506
+ attr_accessor :request_header_modifier
1507
+
1508
+ # Specifies the policy on how requests are shadowed to a separate mirrored
1509
+ # destination service. The proxy does not wait for responses from the shadow
1510
+ # service. Prior to sending traffic to the shadow service, the host/authority
1511
+ # header is suffixed with -shadow.
1512
+ # Corresponds to the JSON property `requestMirrorPolicy`
1513
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteRequestMirrorPolicy]
1514
+ attr_accessor :request_mirror_policy
1515
+
1516
+ # The specification for modifying HTTP header in HTTP request and HTTP response.
1517
+ # Corresponds to the JSON property `responseHeaderModifier`
1518
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteHeaderModifier]
1519
+ attr_accessor :response_header_modifier
1520
+
1521
+ # The specifications for retries.
1522
+ # Corresponds to the JSON property `retryPolicy`
1523
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteRetryPolicy]
1524
+ attr_accessor :retry_policy
1525
+
1526
+ # Specifies the timeout for selected route. Timeout is computed from the time
1527
+ # the request has been fully processed (i.e. end of stream) up until the
1528
+ # response has been completely processed. Timeout includes all retries.
1529
+ # Corresponds to the JSON property `timeout`
1530
+ # @return [String]
1531
+ attr_accessor :timeout
1532
+
1533
+ # The specification for modifying the URL of the request, prior to forwarding
1534
+ # the request to the destination.
1535
+ # Corresponds to the JSON property `urlRewrite`
1536
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteUrlRewrite]
1537
+ attr_accessor :url_rewrite
1538
+
1539
+ def initialize(**args)
1540
+ update!(**args)
1541
+ end
1542
+
1543
+ # Update properties of this object
1544
+ def update!(**args)
1545
+ @cors_policy = args[:cors_policy] if args.key?(:cors_policy)
1546
+ @destinations = args[:destinations] if args.key?(:destinations)
1547
+ @fault_injection_policy = args[:fault_injection_policy] if args.key?(:fault_injection_policy)
1548
+ @redirect = args[:redirect] if args.key?(:redirect)
1549
+ @request_header_modifier = args[:request_header_modifier] if args.key?(:request_header_modifier)
1550
+ @request_mirror_policy = args[:request_mirror_policy] if args.key?(:request_mirror_policy)
1551
+ @response_header_modifier = args[:response_header_modifier] if args.key?(:response_header_modifier)
1552
+ @retry_policy = args[:retry_policy] if args.key?(:retry_policy)
1553
+ @timeout = args[:timeout] if args.key?(:timeout)
1554
+ @url_rewrite = args[:url_rewrite] if args.key?(:url_rewrite)
1555
+ end
1556
+ end
1557
+
1558
+ # RouteMatch defines specifications used to match requests. If multiple match
1559
+ # types are set, this RouteMatch will match if ALL type of matches are matched.
1560
+ class HttpRouteRouteMatch
1561
+ include Google::Apis::Core::Hashable
1562
+
1563
+ # The HTTP request path value should exactly match this value. Only one of
1564
+ # full_path_match, prefix_match, or regex_match should be used.
1565
+ # Corresponds to the JSON property `fullPathMatch`
1566
+ # @return [String]
1567
+ attr_accessor :full_path_match
1568
+
1569
+ # Specifies a list of HTTP request headers to match against. ALL of the supplied
1570
+ # headers must be matched.
1571
+ # Corresponds to the JSON property `headers`
1572
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::HttpRouteHeaderMatch>]
1573
+ attr_accessor :headers
1574
+
1575
+ # Specifies if prefix_match and full_path_match matches are case sensitive. The
1576
+ # default value is false.
1577
+ # Corresponds to the JSON property `ignoreCase`
1578
+ # @return [Boolean]
1579
+ attr_accessor :ignore_case
1580
+ alias_method :ignore_case?, :ignore_case
1581
+
1582
+ # The HTTP request path value must begin with specified prefix_match.
1583
+ # prefix_match must begin with a /. Only one of full_path_match, prefix_match,
1584
+ # or regex_match should be used.
1585
+ # Corresponds to the JSON property `prefixMatch`
1586
+ # @return [String]
1587
+ attr_accessor :prefix_match
1588
+
1589
+ # Specifies a list of query parameters to match against. ALL of the query
1590
+ # parameters must be matched.
1591
+ # Corresponds to the JSON property `queryParameters`
1592
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::HttpRouteQueryParameterMatch>]
1593
+ attr_accessor :query_parameters
1594
+
1595
+ # The HTTP request path value must satisfy the regular expression specified by
1596
+ # regex_match after removing any query parameters and anchor supplied with the
1597
+ # original URL. For regular expression grammar, please see https://github.com/
1598
+ # google/re2/wiki/Syntax Only one of full_path_match, prefix_match, or
1599
+ # regex_match should be used.
1600
+ # Corresponds to the JSON property `regexMatch`
1601
+ # @return [String]
1602
+ attr_accessor :regex_match
1603
+
1604
+ def initialize(**args)
1605
+ update!(**args)
1606
+ end
1607
+
1608
+ # Update properties of this object
1609
+ def update!(**args)
1610
+ @full_path_match = args[:full_path_match] if args.key?(:full_path_match)
1611
+ @headers = args[:headers] if args.key?(:headers)
1612
+ @ignore_case = args[:ignore_case] if args.key?(:ignore_case)
1613
+ @prefix_match = args[:prefix_match] if args.key?(:prefix_match)
1614
+ @query_parameters = args[:query_parameters] if args.key?(:query_parameters)
1615
+ @regex_match = args[:regex_match] if args.key?(:regex_match)
1616
+ end
1617
+ end
1618
+
1619
+ # Specifies how to match traffic and how to route traffic when traffic is
1620
+ # matched.
1621
+ class HttpRouteRouteRule
1622
+ include Google::Apis::Core::Hashable
1623
+
1624
+ # The specifications for routing traffic and applying associated policies.
1625
+ # Corresponds to the JSON property `action`
1626
+ # @return [Google::Apis::NetworkservicesV1beta1::HttpRouteRouteAction]
1627
+ attr_accessor :action
1628
+
1629
+ # A list of matches define conditions used for matching the rule against
1630
+ # incoming HTTP requests. Each match is independent, i.e. this rule will be
1631
+ # matched if ANY one of the matches is satisfied. If no matches field is
1632
+ # specified, this rule will unconditionally match traffic. If a default rule is
1633
+ # desired to be configured, add a rule with no matches specified to the end of
1634
+ # the rules list.
1635
+ # Corresponds to the JSON property `matches`
1636
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::HttpRouteRouteMatch>]
1637
+ attr_accessor :matches
1638
+
1639
+ def initialize(**args)
1640
+ update!(**args)
1641
+ end
1642
+
1643
+ # Update properties of this object
1644
+ def update!(**args)
1645
+ @action = args[:action] if args.key?(:action)
1646
+ @matches = args[:matches] if args.key?(:matches)
1647
+ end
1648
+ end
1649
+
1650
+ # The specification for modifying the URL of the request, prior to forwarding
1651
+ # the request to the destination.
1652
+ class HttpRouteUrlRewrite
1653
+ include Google::Apis::Core::Hashable
1654
+
1655
+ # Prior to forwarding the request to the selected destination, the requests host
1656
+ # header is replaced by this value.
1657
+ # Corresponds to the JSON property `hostRewrite`
1658
+ # @return [String]
1659
+ attr_accessor :host_rewrite
1660
+
1661
+ # Prior to forwarding the request to the selected destination, the matching
1662
+ # portion of the requests path is replaced by this value.
1663
+ # Corresponds to the JSON property `pathPrefixRewrite`
1664
+ # @return [String]
1665
+ attr_accessor :path_prefix_rewrite
1666
+
1667
+ def initialize(**args)
1668
+ update!(**args)
1669
+ end
1670
+
1671
+ # Update properties of this object
1672
+ def update!(**args)
1673
+ @host_rewrite = args[:host_rewrite] if args.key?(:host_rewrite)
1674
+ @path_prefix_rewrite = args[:path_prefix_rewrite] if args.key?(:path_prefix_rewrite)
1675
+ end
1676
+ end
1677
+
368
1678
  # Response returned by the ListEndpointPolicies method.
369
1679
  class ListEndpointPoliciesResponse
370
1680
  include Google::Apis::Core::Hashable
@@ -392,6 +1702,87 @@ module Google
392
1702
  end
393
1703
  end
394
1704
 
1705
+ # Response returned by the ListGateways method.
1706
+ class ListGatewaysResponse
1707
+ include Google::Apis::Core::Hashable
1708
+
1709
+ # List of Gateway resources.
1710
+ # Corresponds to the JSON property `gateways`
1711
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::Gateway>]
1712
+ attr_accessor :gateways
1713
+
1714
+ # If there might be more results than those appearing in this response, then `
1715
+ # next_page_token` is included. To get the next set of results, call this method
1716
+ # again using the value of `next_page_token` as `page_token`.
1717
+ # Corresponds to the JSON property `nextPageToken`
1718
+ # @return [String]
1719
+ attr_accessor :next_page_token
1720
+
1721
+ def initialize(**args)
1722
+ update!(**args)
1723
+ end
1724
+
1725
+ # Update properties of this object
1726
+ def update!(**args)
1727
+ @gateways = args[:gateways] if args.key?(:gateways)
1728
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1729
+ end
1730
+ end
1731
+
1732
+ # Response returned by the ListGrpcRoutes method.
1733
+ class ListGrpcRoutesResponse
1734
+ include Google::Apis::Core::Hashable
1735
+
1736
+ # List of GrpcRoute resources.
1737
+ # Corresponds to the JSON property `grpcRoutes`
1738
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::GrpcRoute>]
1739
+ attr_accessor :grpc_routes
1740
+
1741
+ # If there might be more results than those appearing in this response, then `
1742
+ # next_page_token` is included. To get the next set of results, call this method
1743
+ # again using the value of `next_page_token` as `page_token`.
1744
+ # Corresponds to the JSON property `nextPageToken`
1745
+ # @return [String]
1746
+ attr_accessor :next_page_token
1747
+
1748
+ def initialize(**args)
1749
+ update!(**args)
1750
+ end
1751
+
1752
+ # Update properties of this object
1753
+ def update!(**args)
1754
+ @grpc_routes = args[:grpc_routes] if args.key?(:grpc_routes)
1755
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1756
+ end
1757
+ end
1758
+
1759
+ # Response returned by the ListHttpRoutes method.
1760
+ class ListHttpRoutesResponse
1761
+ include Google::Apis::Core::Hashable
1762
+
1763
+ # List of HttpRoute resources.
1764
+ # Corresponds to the JSON property `httpRoutes`
1765
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::HttpRoute>]
1766
+ attr_accessor :http_routes
1767
+
1768
+ # If there might be more results than those appearing in this response, then `
1769
+ # next_page_token` is included. To get the next set of results, call this method
1770
+ # again using the value of `next_page_token` as `page_token`.
1771
+ # Corresponds to the JSON property `nextPageToken`
1772
+ # @return [String]
1773
+ attr_accessor :next_page_token
1774
+
1775
+ def initialize(**args)
1776
+ update!(**args)
1777
+ end
1778
+
1779
+ # Update properties of this object
1780
+ def update!(**args)
1781
+ @http_routes = args[:http_routes] if args.key?(:http_routes)
1782
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1783
+ end
1784
+ end
1785
+
395
1786
  # The response message for Locations.ListLocations.
396
1787
  class ListLocationsResponse
397
1788
  include Google::Apis::Core::Hashable
@@ -417,19 +1808,100 @@ module Google
417
1808
  end
418
1809
  end
419
1810
 
1811
+ # Response returned by the ListMeshes method.
1812
+ class ListMeshesResponse
1813
+ include Google::Apis::Core::Hashable
1814
+
1815
+ # List of Mesh resources.
1816
+ # Corresponds to the JSON property `meshes`
1817
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::Mesh>]
1818
+ attr_accessor :meshes
1819
+
1820
+ # If there might be more results than those appearing in this response, then `
1821
+ # next_page_token` is included. To get the next set of results, call this method
1822
+ # again using the value of `next_page_token` as `page_token`.
1823
+ # Corresponds to the JSON property `nextPageToken`
1824
+ # @return [String]
1825
+ attr_accessor :next_page_token
1826
+
1827
+ def initialize(**args)
1828
+ update!(**args)
1829
+ end
1830
+
1831
+ # Update properties of this object
1832
+ def update!(**args)
1833
+ @meshes = args[:meshes] if args.key?(:meshes)
1834
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1835
+ end
1836
+ end
1837
+
420
1838
  # The response message for Operations.ListOperations.
421
1839
  class ListOperationsResponse
422
1840
  include Google::Apis::Core::Hashable
423
1841
 
424
- # The standard List next-page token.
1842
+ # The standard List next-page token.
1843
+ # Corresponds to the JSON property `nextPageToken`
1844
+ # @return [String]
1845
+ attr_accessor :next_page_token
1846
+
1847
+ # A list of operations that matches the specified filter in the request.
1848
+ # Corresponds to the JSON property `operations`
1849
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::Operation>]
1850
+ attr_accessor :operations
1851
+
1852
+ def initialize(**args)
1853
+ update!(**args)
1854
+ end
1855
+
1856
+ # Update properties of this object
1857
+ def update!(**args)
1858
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1859
+ @operations = args[:operations] if args.key?(:operations)
1860
+ end
1861
+ end
1862
+
1863
+ # Response returned by the ListServiceBindings method.
1864
+ class ListServiceBindingsResponse
1865
+ include Google::Apis::Core::Hashable
1866
+
1867
+ # If there might be more results than those appearing in this response, then `
1868
+ # next_page_token` is included. To get the next set of results, call this method
1869
+ # again using the value of `next_page_token` as `page_token`.
1870
+ # Corresponds to the JSON property `nextPageToken`
1871
+ # @return [String]
1872
+ attr_accessor :next_page_token
1873
+
1874
+ # List of ServiceBinding resources.
1875
+ # Corresponds to the JSON property `serviceBindings`
1876
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::ServiceBinding>]
1877
+ attr_accessor :service_bindings
1878
+
1879
+ def initialize(**args)
1880
+ update!(**args)
1881
+ end
1882
+
1883
+ # Update properties of this object
1884
+ def update!(**args)
1885
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1886
+ @service_bindings = args[:service_bindings] if args.key?(:service_bindings)
1887
+ end
1888
+ end
1889
+
1890
+ # Response returned by the ListTcpRoutes method.
1891
+ class ListTcpRoutesResponse
1892
+ include Google::Apis::Core::Hashable
1893
+
1894
+ # If there might be more results than those appearing in this response, then `
1895
+ # next_page_token` is included. To get the next set of results, call this method
1896
+ # again using the value of `next_page_token` as `page_token`.
425
1897
  # Corresponds to the JSON property `nextPageToken`
426
1898
  # @return [String]
427
1899
  attr_accessor :next_page_token
428
1900
 
429
- # A list of operations that matches the specified filter in the request.
430
- # Corresponds to the JSON property `operations`
431
- # @return [Array<Google::Apis::NetworkservicesV1beta1::Operation>]
432
- attr_accessor :operations
1901
+ # List of TcpRoute resources.
1902
+ # Corresponds to the JSON property `tcpRoutes`
1903
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::TcpRoute>]
1904
+ attr_accessor :tcp_routes
433
1905
 
434
1906
  def initialize(**args)
435
1907
  update!(**args)
@@ -438,12 +1910,12 @@ module Google
438
1910
  # Update properties of this object
439
1911
  def update!(**args)
440
1912
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
441
- @operations = args[:operations] if args.key?(:operations)
1913
+ @tcp_routes = args[:tcp_routes] if args.key?(:tcp_routes)
442
1914
  end
443
1915
  end
444
1916
 
445
- # Response returned by the ListServiceBindings method.
446
- class ListServiceBindingsResponse
1917
+ # Response returned by the ListTlsRoutes method.
1918
+ class ListTlsRoutesResponse
447
1919
  include Google::Apis::Core::Hashable
448
1920
 
449
1921
  # If there might be more results than those appearing in this response, then `
@@ -453,10 +1925,10 @@ module Google
453
1925
  # @return [String]
454
1926
  attr_accessor :next_page_token
455
1927
 
456
- # List of ServiceBinding resources.
457
- # Corresponds to the JSON property `serviceBindings`
458
- # @return [Array<Google::Apis::NetworkservicesV1beta1::ServiceBinding>]
459
- attr_accessor :service_bindings
1928
+ # List of TlsRoute resources.
1929
+ # Corresponds to the JSON property `tlsRoutes`
1930
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::TlsRoute>]
1931
+ attr_accessor :tls_routes
460
1932
 
461
1933
  def initialize(**args)
462
1934
  update!(**args)
@@ -465,7 +1937,7 @@ module Google
465
1937
  # Update properties of this object
466
1938
  def update!(**args)
467
1939
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
468
- @service_bindings = args[:service_bindings] if args.key?(:service_bindings)
1940
+ @tls_routes = args[:tls_routes] if args.key?(:tls_routes)
469
1941
  end
470
1942
  end
471
1943
 
@@ -516,6 +1988,68 @@ module Google
516
1988
  end
517
1989
  end
518
1990
 
1991
+ # Mesh represents a logical configuration grouping for workload to workload
1992
+ # communication within a service mesh. Routes that point to mesh dictate how
1993
+ # requests are routed within this logical mesh boundary.
1994
+ class Mesh
1995
+ include Google::Apis::Core::Hashable
1996
+
1997
+ # Output only. The timestamp when the resource was created.
1998
+ # Corresponds to the JSON property `createTime`
1999
+ # @return [String]
2000
+ attr_accessor :create_time
2001
+
2002
+ # Optional. A free-text description of the resource. Max length 1024 characters.
2003
+ # Corresponds to the JSON property `description`
2004
+ # @return [String]
2005
+ attr_accessor :description
2006
+
2007
+ # Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to
2008
+ # listen on the specified port of localhost (127.0.0.1) address. The SIDECAR
2009
+ # proxy will expect all traffic to be redirected to this port regardless of its
2010
+ # actual ip:port destination. If unset, a port '15001' is used as the
2011
+ # interception port. This will is applicable only for sidecar proxy deployments.
2012
+ # Corresponds to the JSON property `interceptionPort`
2013
+ # @return [Fixnum]
2014
+ attr_accessor :interception_port
2015
+
2016
+ # Optional. Set of label tags associated with the Mesh resource.
2017
+ # Corresponds to the JSON property `labels`
2018
+ # @return [Hash<String,String>]
2019
+ attr_accessor :labels
2020
+
2021
+ # Required. Name of the Mesh resource. It matches pattern `projects/*/locations/
2022
+ # global/meshes/`.
2023
+ # Corresponds to the JSON property `name`
2024
+ # @return [String]
2025
+ attr_accessor :name
2026
+
2027
+ # Output only. Server-defined URL of this resource
2028
+ # Corresponds to the JSON property `selfLink`
2029
+ # @return [String]
2030
+ attr_accessor :self_link
2031
+
2032
+ # Output only. The timestamp when the resource was updated.
2033
+ # Corresponds to the JSON property `updateTime`
2034
+ # @return [String]
2035
+ attr_accessor :update_time
2036
+
2037
+ def initialize(**args)
2038
+ update!(**args)
2039
+ end
2040
+
2041
+ # Update properties of this object
2042
+ def update!(**args)
2043
+ @create_time = args[:create_time] if args.key?(:create_time)
2044
+ @description = args[:description] if args.key?(:description)
2045
+ @interception_port = args[:interception_port] if args.key?(:interception_port)
2046
+ @labels = args[:labels] if args.key?(:labels)
2047
+ @name = args[:name] if args.key?(:name)
2048
+ @self_link = args[:self_link] if args.key?(:self_link)
2049
+ @update_time = args[:update_time] if args.key?(:update_time)
2050
+ end
2051
+ end
2052
+
519
2053
  # The matcher that is based on node metadata presented by xDS clients.
520
2054
  class MetadataLabelMatcher
521
2055
  include Google::Apis::Core::Hashable
@@ -949,6 +2483,204 @@ module Google
949
2483
  end
950
2484
  end
951
2485
 
2486
+ # TcpRoute is the resource defining how TCP traffic should be routed by a Mesh/
2487
+ # Gateway resource.
2488
+ class TcpRoute
2489
+ include Google::Apis::Core::Hashable
2490
+
2491
+ # Output only. The timestamp when the resource was created.
2492
+ # Corresponds to the JSON property `createTime`
2493
+ # @return [String]
2494
+ attr_accessor :create_time
2495
+
2496
+ # Optional. A free-text description of the resource. Max length 1024 characters.
2497
+ # Corresponds to the JSON property `description`
2498
+ # @return [String]
2499
+ attr_accessor :description
2500
+
2501
+ # Optional. Gateways defines a list of gateways this TcpRoute is attached to, as
2502
+ # one of the routing rules to route the requests served by the gateway. Each
2503
+ # gateway reference should match the pattern: `projects/*/locations/global/
2504
+ # gateways/`
2505
+ # Corresponds to the JSON property `gateways`
2506
+ # @return [Array<String>]
2507
+ attr_accessor :gateways
2508
+
2509
+ # Optional. Set of label tags associated with the TcpRoute resource.
2510
+ # Corresponds to the JSON property `labels`
2511
+ # @return [Hash<String,String>]
2512
+ attr_accessor :labels
2513
+
2514
+ # Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one
2515
+ # of the routing rules to route the requests served by the mesh. Each mesh
2516
+ # reference should match the pattern: `projects/*/locations/global/meshes/` The
2517
+ # attached Mesh should be of a type SIDECAR
2518
+ # Corresponds to the JSON property `meshes`
2519
+ # @return [Array<String>]
2520
+ attr_accessor :meshes
2521
+
2522
+ # Required. Name of the TcpRoute resource. It matches pattern `projects/*/
2523
+ # locations/global/tcpRoutes/tcp_route_name>`.
2524
+ # Corresponds to the JSON property `name`
2525
+ # @return [String]
2526
+ attr_accessor :name
2527
+
2528
+ # Required. Rules that define how traffic is routed and handled. At least one
2529
+ # RouteRule must be supplied. If there are multiple rules then the action taken
2530
+ # will be the first rule to match.
2531
+ # Corresponds to the JSON property `rules`
2532
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::TcpRouteRouteRule>]
2533
+ attr_accessor :rules
2534
+
2535
+ # Output only. Server-defined URL of this resource
2536
+ # Corresponds to the JSON property `selfLink`
2537
+ # @return [String]
2538
+ attr_accessor :self_link
2539
+
2540
+ # Output only. The timestamp when the resource was updated.
2541
+ # Corresponds to the JSON property `updateTime`
2542
+ # @return [String]
2543
+ attr_accessor :update_time
2544
+
2545
+ def initialize(**args)
2546
+ update!(**args)
2547
+ end
2548
+
2549
+ # Update properties of this object
2550
+ def update!(**args)
2551
+ @create_time = args[:create_time] if args.key?(:create_time)
2552
+ @description = args[:description] if args.key?(:description)
2553
+ @gateways = args[:gateways] if args.key?(:gateways)
2554
+ @labels = args[:labels] if args.key?(:labels)
2555
+ @meshes = args[:meshes] if args.key?(:meshes)
2556
+ @name = args[:name] if args.key?(:name)
2557
+ @rules = args[:rules] if args.key?(:rules)
2558
+ @self_link = args[:self_link] if args.key?(:self_link)
2559
+ @update_time = args[:update_time] if args.key?(:update_time)
2560
+ end
2561
+ end
2562
+
2563
+ # The specifications for routing traffic and applying associated policies.
2564
+ class TcpRouteRouteAction
2565
+ include Google::Apis::Core::Hashable
2566
+
2567
+ # Optional. The destination services to which traffic should be forwarded. At
2568
+ # least one destination service is required.
2569
+ # Corresponds to the JSON property `destinations`
2570
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::TcpRouteRouteDestination>]
2571
+ attr_accessor :destinations
2572
+
2573
+ # Optional. If true, Router will use the destination IP and port of the original
2574
+ # connection as the destination of the request. Default is false.
2575
+ # Corresponds to the JSON property `originalDestination`
2576
+ # @return [Boolean]
2577
+ attr_accessor :original_destination
2578
+ alias_method :original_destination?, :original_destination
2579
+
2580
+ def initialize(**args)
2581
+ update!(**args)
2582
+ end
2583
+
2584
+ # Update properties of this object
2585
+ def update!(**args)
2586
+ @destinations = args[:destinations] if args.key?(:destinations)
2587
+ @original_destination = args[:original_destination] if args.key?(:original_destination)
2588
+ end
2589
+ end
2590
+
2591
+ # Describe the destination for traffic to be routed to.
2592
+ class TcpRouteRouteDestination
2593
+ include Google::Apis::Core::Hashable
2594
+
2595
+ # Required. The URL of a BackendService to route traffic to.
2596
+ # Corresponds to the JSON property `serviceName`
2597
+ # @return [String]
2598
+ attr_accessor :service_name
2599
+
2600
+ # Optional. Specifies the proportion of requests forwarded to the backend
2601
+ # referenced by the serviceName field. This is computed as: weight/Sum(weights
2602
+ # in this destination list). For non-zero values, there may be some epsilon from
2603
+ # the exact proportion defined here depending on the precision an implementation
2604
+ # supports. If only one serviceName is specified and it has a weight greater
2605
+ # than 0, 100% of the traffic is forwarded to that backend. If weights are
2606
+ # specified for any one service name, they need to be specified for all of them.
2607
+ # If weights are unspecified for all services, then, traffic is distributed in
2608
+ # equal proportions to all of them.
2609
+ # Corresponds to the JSON property `weight`
2610
+ # @return [Fixnum]
2611
+ attr_accessor :weight
2612
+
2613
+ def initialize(**args)
2614
+ update!(**args)
2615
+ end
2616
+
2617
+ # Update properties of this object
2618
+ def update!(**args)
2619
+ @service_name = args[:service_name] if args.key?(:service_name)
2620
+ @weight = args[:weight] if args.key?(:weight)
2621
+ end
2622
+ end
2623
+
2624
+ # RouteMatch defines the predicate used to match requests to a given action.
2625
+ # Multiple match types are "OR"ed for evaluation. If no routeMatch field is
2626
+ # specified, this rule will unconditionally match traffic.
2627
+ class TcpRouteRouteMatch
2628
+ include Google::Apis::Core::Hashable
2629
+
2630
+ # Required. Must be specified in the CIDR range format. A CIDR range consists of
2631
+ # an IP Address and a prefix length to construct the subnet mask. By default,
2632
+ # the prefix length is 32 (i.e. matches a single IP address). Only IPV4
2633
+ # addresses are supported. Examples: "10.0.0.1" - matches against this exact IP
2634
+ # address. "10.0.0.0/8" - matches against any IP address within the 10.0.0.0
2635
+ # subnet and 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP address'.
2636
+ # Corresponds to the JSON property `address`
2637
+ # @return [String]
2638
+ attr_accessor :address
2639
+
2640
+ # Required. Specifies the destination port to match against.
2641
+ # Corresponds to the JSON property `port`
2642
+ # @return [String]
2643
+ attr_accessor :port
2644
+
2645
+ def initialize(**args)
2646
+ update!(**args)
2647
+ end
2648
+
2649
+ # Update properties of this object
2650
+ def update!(**args)
2651
+ @address = args[:address] if args.key?(:address)
2652
+ @port = args[:port] if args.key?(:port)
2653
+ end
2654
+ end
2655
+
2656
+ # Specifies how to match traffic and how to route traffic when traffic is
2657
+ # matched.
2658
+ class TcpRouteRouteRule
2659
+ include Google::Apis::Core::Hashable
2660
+
2661
+ # The specifications for routing traffic and applying associated policies.
2662
+ # Corresponds to the JSON property `action`
2663
+ # @return [Google::Apis::NetworkservicesV1beta1::TcpRouteRouteAction]
2664
+ attr_accessor :action
2665
+
2666
+ # Optional. RouteMatch defines the predicate used to match requests to a given
2667
+ # action. Multiple match types are "OR"ed for evaluation. If no routeMatch field
2668
+ # is specified, this rule will unconditionally match traffic.
2669
+ # Corresponds to the JSON property `matches`
2670
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::TcpRouteRouteMatch>]
2671
+ attr_accessor :matches
2672
+
2673
+ def initialize(**args)
2674
+ update!(**args)
2675
+ end
2676
+
2677
+ # Update properties of this object
2678
+ def update!(**args)
2679
+ @action = args[:action] if args.key?(:action)
2680
+ @matches = args[:matches] if args.key?(:matches)
2681
+ end
2682
+ end
2683
+
952
2684
  # Request message for `TestIamPermissions` method.
953
2685
  class TestIamPermissionsRequest
954
2686
  include Google::Apis::Core::Hashable
@@ -989,6 +2721,184 @@ module Google
989
2721
  end
990
2722
  end
991
2723
 
2724
+ # TlsRoute defines how traffic should be routed based on SNI and other matching
2725
+ # L3 attributes.
2726
+ class TlsRoute
2727
+ include Google::Apis::Core::Hashable
2728
+
2729
+ # Output only. The timestamp when the resource was created.
2730
+ # Corresponds to the JSON property `createTime`
2731
+ # @return [String]
2732
+ attr_accessor :create_time
2733
+
2734
+ # Optional. A free-text description of the resource. Max length 1024 characters.
2735
+ # Corresponds to the JSON property `description`
2736
+ # @return [String]
2737
+ attr_accessor :description
2738
+
2739
+ # Optional. Gateways defines a list of gateways this TlsRoute is attached to, as
2740
+ # one of the routing rules to route the requests served by the gateway. Each
2741
+ # gateway reference should match the pattern: `projects/*/locations/global/
2742
+ # gateways/`
2743
+ # Corresponds to the JSON property `gateways`
2744
+ # @return [Array<String>]
2745
+ attr_accessor :gateways
2746
+
2747
+ # Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one
2748
+ # of the routing rules to route the requests served by the mesh. Each mesh
2749
+ # reference should match the pattern: `projects/*/locations/global/meshes/` The
2750
+ # attached Mesh should be of a type SIDECAR
2751
+ # Corresponds to the JSON property `meshes`
2752
+ # @return [Array<String>]
2753
+ attr_accessor :meshes
2754
+
2755
+ # Required. Name of the TlsRoute resource. It matches pattern `projects/*/
2756
+ # locations/global/tlsRoutes/tls_route_name>`.
2757
+ # Corresponds to the JSON property `name`
2758
+ # @return [String]
2759
+ attr_accessor :name
2760
+
2761
+ # Required. Rules that define how traffic is routed and handled. At least one
2762
+ # RouteRule must be supplied. If there are multiple rules then the action taken
2763
+ # will be the first rule to match.
2764
+ # Corresponds to the JSON property `rules`
2765
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::TlsRouteRouteRule>]
2766
+ attr_accessor :rules
2767
+
2768
+ # Output only. Server-defined URL of this resource
2769
+ # Corresponds to the JSON property `selfLink`
2770
+ # @return [String]
2771
+ attr_accessor :self_link
2772
+
2773
+ # Output only. The timestamp when the resource was updated.
2774
+ # Corresponds to the JSON property `updateTime`
2775
+ # @return [String]
2776
+ attr_accessor :update_time
2777
+
2778
+ def initialize(**args)
2779
+ update!(**args)
2780
+ end
2781
+
2782
+ # Update properties of this object
2783
+ def update!(**args)
2784
+ @create_time = args[:create_time] if args.key?(:create_time)
2785
+ @description = args[:description] if args.key?(:description)
2786
+ @gateways = args[:gateways] if args.key?(:gateways)
2787
+ @meshes = args[:meshes] if args.key?(:meshes)
2788
+ @name = args[:name] if args.key?(:name)
2789
+ @rules = args[:rules] if args.key?(:rules)
2790
+ @self_link = args[:self_link] if args.key?(:self_link)
2791
+ @update_time = args[:update_time] if args.key?(:update_time)
2792
+ end
2793
+ end
2794
+
2795
+ # The specifications for routing traffic and applying associated policies.
2796
+ class TlsRouteRouteAction
2797
+ include Google::Apis::Core::Hashable
2798
+
2799
+ # Required. The destination services to which traffic should be forwarded. At
2800
+ # least one destination service is required.
2801
+ # Corresponds to the JSON property `destinations`
2802
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::TlsRouteRouteDestination>]
2803
+ attr_accessor :destinations
2804
+
2805
+ def initialize(**args)
2806
+ update!(**args)
2807
+ end
2808
+
2809
+ # Update properties of this object
2810
+ def update!(**args)
2811
+ @destinations = args[:destinations] if args.key?(:destinations)
2812
+ end
2813
+ end
2814
+
2815
+ # Describe the destination for traffic to be routed to.
2816
+ class TlsRouteRouteDestination
2817
+ include Google::Apis::Core::Hashable
2818
+
2819
+ # Required. The URL of a BackendService to route traffic to.
2820
+ # Corresponds to the JSON property `serviceName`
2821
+ # @return [String]
2822
+ attr_accessor :service_name
2823
+
2824
+ # Optional. Specifies the proportion of requests forwareded to the backend
2825
+ # referenced by the service_name field. This is computed as: weight/Sum(weights
2826
+ # in destinations) Weights in all destinations does not need to sum up to 100.
2827
+ # Corresponds to the JSON property `weight`
2828
+ # @return [Fixnum]
2829
+ attr_accessor :weight
2830
+
2831
+ def initialize(**args)
2832
+ update!(**args)
2833
+ end
2834
+
2835
+ # Update properties of this object
2836
+ def update!(**args)
2837
+ @service_name = args[:service_name] if args.key?(:service_name)
2838
+ @weight = args[:weight] if args.key?(:weight)
2839
+ end
2840
+ end
2841
+
2842
+ # RouteMatch defines the predicate used to match requests to a given action.
2843
+ # Multiple match types are “AND”ed for evaluation. If no routeMatch field is
2844
+ # specified, this rule will unconditionally match traffic.
2845
+ class TlsRouteRouteMatch
2846
+ include Google::Apis::Core::Hashable
2847
+
2848
+ # Optional. ALPN (Application-Layer Protocol Negotiation) to match against.
2849
+ # Examples: "http/1.1", "h2". At least one of sni_host and alpn is required. Up
2850
+ # to 5 alpns across all matches can be set.
2851
+ # Corresponds to the JSON property `alpn`
2852
+ # @return [Array<String>]
2853
+ attr_accessor :alpn
2854
+
2855
+ # Optional. SNI (server name indicator) to match against. SNI will be matched
2856
+ # against all wildcard domains, i.e. www.example.com will be first matched
2857
+ # against www.example.com, then *.example.com, then *.com. Partial wildcards are
2858
+ # not supported, and values like *w.example.com are invalid. At least one of
2859
+ # sni_host and alpn is required. Up to 5 sni hosts across all matches can be set.
2860
+ # Corresponds to the JSON property `sniHost`
2861
+ # @return [Array<String>]
2862
+ attr_accessor :sni_host
2863
+
2864
+ def initialize(**args)
2865
+ update!(**args)
2866
+ end
2867
+
2868
+ # Update properties of this object
2869
+ def update!(**args)
2870
+ @alpn = args[:alpn] if args.key?(:alpn)
2871
+ @sni_host = args[:sni_host] if args.key?(:sni_host)
2872
+ end
2873
+ end
2874
+
2875
+ # Specifies how to match traffic and how to route traffic when traffic is
2876
+ # matched.
2877
+ class TlsRouteRouteRule
2878
+ include Google::Apis::Core::Hashable
2879
+
2880
+ # The specifications for routing traffic and applying associated policies.
2881
+ # Corresponds to the JSON property `action`
2882
+ # @return [Google::Apis::NetworkservicesV1beta1::TlsRouteRouteAction]
2883
+ attr_accessor :action
2884
+
2885
+ # Required. RouteMatch defines the predicate used to match requests to a given
2886
+ # action. Multiple match types are “OR”ed for evaluation.
2887
+ # Corresponds to the JSON property `matches`
2888
+ # @return [Array<Google::Apis::NetworkservicesV1beta1::TlsRouteRouteMatch>]
2889
+ attr_accessor :matches
2890
+
2891
+ def initialize(**args)
2892
+ update!(**args)
2893
+ end
2894
+
2895
+ # Update properties of this object
2896
+ def update!(**args)
2897
+ @action = args[:action] if args.key?(:action)
2898
+ @matches = args[:matches] if args.key?(:matches)
2899
+ end
2900
+ end
2901
+
992
2902
  # Specification of a port-based selector.
993
2903
  class TrafficPortSelector
994
2904
  include Google::Apis::Core::Hashable