google-apis-networkservices_v1beta1 0.7.0 → 0.10.0

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